updated cogs
This commit is contained in:
@@ -35,8 +35,8 @@ class Help(commands.Cog):
|
||||
async def show_main_help(self, ctx):
|
||||
"""Show main help menu"""
|
||||
embed = discord.Embed(
|
||||
title='🎭 Original Character Bot - Help Menu',
|
||||
description='Welcome to the OC Bot! Create and manage original characters with ease.',
|
||||
title='🎭 Original Character Bot',
|
||||
description='Manage and roleplay as your original characters!',
|
||||
color=discord.Color.blue()
|
||||
)
|
||||
|
||||
@@ -85,6 +85,7 @@ class Help(commands.Cog):
|
||||
inline=False
|
||||
)
|
||||
|
||||
embed.set_footer(text='Coded by Ball Studios 🎨')
|
||||
await ctx.send(embed=embed)
|
||||
|
||||
async def help_create(self, ctx):
|
||||
@@ -143,6 +144,7 @@ class Help(commands.Cog):
|
||||
inline=False
|
||||
)
|
||||
|
||||
embed.set_footer(text='Coded by Ball Studios 🎨')
|
||||
await ctx.send(embed=embed)
|
||||
|
||||
async def help_triggers(self, ctx):
|
||||
|
||||
43
cogs/oc.py
43
cogs/oc.py
@@ -11,18 +11,22 @@ class OC(commands.Cog):
|
||||
def __init__(self, bot):
|
||||
self.bot = bot
|
||||
|
||||
@commands.command(name='oc')
|
||||
async def oc_command(self, ctx):
|
||||
"""Base OC command"""
|
||||
await ctx.send('Use `,oc create`, `,oc list`, `,oc edit`, `,oc delete`, `,oc info`, or `,oc preview`\n\nType `,help oc` for more information.')
|
||||
|
||||
@commands.command(name='oc')
|
||||
async def oc_create(self, ctx):
|
||||
"""Start interactive character creation wizard"""
|
||||
if ctx.invoked_subcommand is not None:
|
||||
return
|
||||
|
||||
await ctx.send('Use `,oc create` to start the wizard.')
|
||||
@commands.group(name='oc', invoke_without_command=True)
|
||||
async def oc_group(self, ctx):
|
||||
"""Original Character management commands"""
|
||||
if ctx.invoked_subcommand is None:
|
||||
embed = discord.Embed(
|
||||
title='🎭 OC Commands',
|
||||
description='Use `,oc <command>` for character management',
|
||||
color=discord.Color.purple()
|
||||
)
|
||||
embed.add_field(name='`,oc create`', value='Create a new character', inline=False)
|
||||
embed.add_field(name='`,oc list`', value='List your characters', inline=False)
|
||||
embed.add_field(name='`,oc info <name>`', value='View character details', inline=False)
|
||||
embed.add_field(name='`,oc edit <name>`', value='Edit a character', inline=False)
|
||||
embed.add_field(name='`,oc delete <name>`', value='Delete a character', inline=False)
|
||||
embed.add_field(name='`,oc preview <name>`', value='Preview character message', inline=False)
|
||||
await ctx.send(embed=embed)
|
||||
|
||||
async def prompt_user(self, ctx, prompt_text, timeout=120):
|
||||
"""Helper to get user input with timeout"""
|
||||
@@ -36,10 +40,10 @@ class OC(commands.Cog):
|
||||
)
|
||||
return msg.content
|
||||
except asyncio.TimeoutError:
|
||||
await ctx.send('❌ Character creation cancelled (timeout).')
|
||||
await ctx.send('❌ Cancelled (timeout).')
|
||||
return None
|
||||
|
||||
@oc_create.command(name='create')
|
||||
@oc_group.command(name='create')
|
||||
async def create(self, ctx):
|
||||
"""Interactive character creation"""
|
||||
db = self.bot.db if hasattr(self.bot, 'db') else None
|
||||
@@ -107,11 +111,12 @@ class OC(commands.Cog):
|
||||
embed.add_field(name='Avatar', value=f'[Link]({avatar_url})', inline=False)
|
||||
if description:
|
||||
embed.add_field(name='Description', value=description, inline=False)
|
||||
embed.set_footer(text='Use your trigger to send messages as this character!')
|
||||
await ctx.send(embed=embed)
|
||||
else:
|
||||
await ctx.send('❌ Failed to create character.')
|
||||
|
||||
@oc_create.command(name='list')
|
||||
@oc_group.command(name='list')
|
||||
async def list_characters(self, ctx):
|
||||
"""List all user's characters"""
|
||||
db = self.bot.db if hasattr(self.bot, 'db') else None
|
||||
@@ -139,7 +144,7 @@ class OC(commands.Cog):
|
||||
|
||||
await ctx.send(embed=embed)
|
||||
|
||||
@oc_create.command(name='info')
|
||||
@oc_group.command(name='info')
|
||||
async def info(self, ctx, *, character_name):
|
||||
"""Show character information"""
|
||||
db = self.bot.db if hasattr(self.bot, 'db') else None
|
||||
@@ -173,7 +178,7 @@ class OC(commands.Cog):
|
||||
|
||||
await ctx.send(embed=embed)
|
||||
|
||||
@oc_create.command(name='edit')
|
||||
@oc_group.command(name='edit')
|
||||
async def edit(self, ctx, character_name=None):
|
||||
"""Edit a character"""
|
||||
db = self.bot.db if hasattr(self.bot, 'db') else None
|
||||
@@ -290,7 +295,7 @@ class OC(commands.Cog):
|
||||
else:
|
||||
await ctx.send('❌ Failed to update character.')
|
||||
|
||||
@oc_create.command(name='delete')
|
||||
@oc_group.command(name='delete')
|
||||
async def delete(self, ctx, *, character_name):
|
||||
"""Delete a character"""
|
||||
db = self.bot.db if hasattr(self.bot, 'db') else None
|
||||
@@ -330,7 +335,7 @@ class OC(commands.Cog):
|
||||
else:
|
||||
await ctx.send('❌ Failed to delete character.')
|
||||
|
||||
@oc_create.command(name='preview')
|
||||
@oc_group.command(name='preview')
|
||||
async def preview(self, ctx, *, character_name):
|
||||
"""Preview how a character message will look"""
|
||||
db = self.bot.db if hasattr(self.bot, 'db') else None
|
||||
|
||||
@@ -86,7 +86,7 @@ class Utils(commands.Cog):
|
||||
async def about(self, ctx):
|
||||
"""About the bot"""
|
||||
embed = discord.Embed(
|
||||
title='🎭 About OC Bot',
|
||||
title='🎭 Original Character Bot',
|
||||
description='A bot for managing and roleplaying as your original characters',
|
||||
color=discord.Color.purple()
|
||||
)
|
||||
@@ -113,6 +113,7 @@ class Utils(commands.Cog):
|
||||
inline=False
|
||||
)
|
||||
|
||||
embed.set_footer(text='Coded by Ball Studios 🎨')
|
||||
await ctx.send(embed=embed)
|
||||
|
||||
async def setup(bot):
|
||||
|
||||
Reference in New Issue
Block a user