changed topic command to output topic if not given arg
This commit is contained in:
parent
0898aaf4de
commit
4bdd2a7203
1 changed files with 13 additions and 7 deletions
|
|
@ -113,7 +113,7 @@ class ChatGPT(commands.Cog):
|
||||||
async def personality(self, ctx, personality_type=None):
|
async def personality(self, ctx, personality_type=None):
|
||||||
if personality_type:
|
if personality_type:
|
||||||
self.edit_channel_config(ctx.channel.id, "personality", personality_type)
|
self.edit_channel_config(ctx.channel.id, "personality", personality_type)
|
||||||
await ctx.send("Personality changed to " + personality_type)
|
await ctx.send(f"Personality changed to {personality_type}")
|
||||||
else:
|
else:
|
||||||
channel_config = await self.get_channel_config(ctx.channel.id)
|
channel_config = await self.get_channel_config(ctx.channel.id)
|
||||||
current_personality = channel_config["personality"]
|
current_personality = channel_config["personality"]
|
||||||
|
|
@ -125,9 +125,15 @@ class ChatGPT(commands.Cog):
|
||||||
help="Set the channel topic for the bot. Usage: !topic (topic)",
|
help="Set the channel topic for the bot. Usage: !topic (topic)",
|
||||||
brief="Set channel topic"
|
brief="Set channel topic"
|
||||||
)
|
)
|
||||||
async def topic(self, ctx, channel_topic):
|
async def topic(self, ctx, channel_topic=None):
|
||||||
|
if channel_topic:
|
||||||
self.edit_channel_config(ctx.channel.id, "channel_topic", channel_topic)
|
self.edit_channel_config(ctx.channel.id, "channel_topic", channel_topic)
|
||||||
await ctx.send("Topic changed to " + channel_topic)
|
await ctx.send(f"Topic changed to {channel_topic}")
|
||||||
|
else:
|
||||||
|
channel_config = await self.get_channel_config(ctx.channel.id)
|
||||||
|
current_topic = channel_config["channel_topic"]
|
||||||
|
await ctx.send(f"Current topic is {current_topic}")
|
||||||
|
|
||||||
|
|
||||||
@commands.command(
|
@commands.command(
|
||||||
description="Chat",
|
description="Chat",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue