|
| 1 | +from discord.ext import commands |
| 2 | +from libs.utils import GuildContext |
| 3 | +from rodhaj import Rodhaj |
| 4 | + |
| 5 | + |
| 6 | +class Snippets(commands.Cog): |
| 7 | + """ |
| 8 | + Cog for snippet-related commands (#21) |
| 9 | + """ |
| 10 | + |
| 11 | + def __init__(self, bot: Rodhaj): |
| 12 | + self._bot = bot |
| 13 | + |
| 14 | + @commands.guild_only() |
| 15 | + @commands.group(name="snippet") |
| 16 | + async def snippet_cmd(self, ctx: GuildContext): |
| 17 | + if ctx.invoked_subcommand is None: |
| 18 | + await ctx.send("placeholder for base command") |
| 19 | + |
| 20 | + @commands.guild_only() |
| 21 | + @snippet_cmd.command() |
| 22 | + async def remove(self, ctx, *args): |
| 23 | + await ctx.send("placeholder for snippet remove") |
| 24 | + |
| 25 | + @commands.guild_only() |
| 26 | + @snippet_cmd.command() |
| 27 | + async def new(self, ctx, *args): |
| 28 | + await ctx.send("placeholder for snippet new") |
| 29 | + |
| 30 | + @commands.guild_only() |
| 31 | + @snippet_cmd.command() |
| 32 | + async def show(self, ctx, *args): |
| 33 | + await ctx.send("placeholder for snippet show") |
| 34 | + |
| 35 | + @commands.guild_only() |
| 36 | + @snippet_cmd.command() |
| 37 | + async def list(self, ctx, *args): |
| 38 | + await ctx.send("placeholder for snippet list") |
| 39 | + |
| 40 | + @commands.guild_only() |
| 41 | + @snippet_cmd.command() |
| 42 | + async def edit(self, ctx, *args): |
| 43 | + await ctx.send("placeholder for snippet edit") |
| 44 | + |
| 45 | + |
| 46 | +async def setup(bot: Rodhaj): |
| 47 | + await bot.add_cog(Snippets(bot)) |
0 commit comments