changed personality to accept no args and display current personality
This commit is contained in:
parent
97eabfcc60
commit
0898aaf4de
1 changed files with 12 additions and 7 deletions
|
|
@ -109,11 +109,16 @@ class ChatGPT(commands.Cog):
|
||||||
description="Personality",
|
description="Personality",
|
||||||
help="Set the personality of the bot. Usage: !personality (personality)",
|
help="Set the personality of the bot. Usage: !personality (personality)",
|
||||||
brief="Set the personality"
|
brief="Set the personality"
|
||||||
)
|
)
|
||||||
async def personality(self, ctx):
|
async def personality(self, ctx, personality_type=None):
|
||||||
personality_type = ctx.message.content.split(" ", maxsplit=1)[1]
|
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("Personality changed to " + personality_type)
|
||||||
|
else:
|
||||||
|
channel_config = await self.get_channel_config(ctx.channel.id)
|
||||||
|
current_personality = channel_config["personality"]
|
||||||
|
await ctx.send(f"Current personality is {current_personality}")
|
||||||
|
|
||||||
|
|
||||||
@commands.command(
|
@commands.command(
|
||||||
description="Topic",
|
description="Topic",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue