diff --git a/cogs/modcommands.py b/cogs/modcommands.py new file mode 100644 index 0000000..f28fee0 --- /dev/null +++ b/cogs/modcommands.py @@ -0,0 +1,29 @@ +import discord +from discord.ext import commands +from functions import checks + + +class ModCommands(commands.Cog): + def __init__(self, client): + self.client = client + + def cog_check(self, ctx): + return checks.isModPlus(ctx) + + @commands.command(name="Say") + async def say(self, ctx, *, arg): + # Delete the original message + await ctx.message.delete() + + # Attach the server icon as a file + file = discord.File("files/images/server_icon.png", filename="icon.png") + + # Set up the embed + embed = discord.Embed(colour=discord.Colour.orange()) + embed.set_author(name=ctx.author.display_name, icon_url="attachment://icon.png") + embed.description = arg + await ctx.send(embed=embed, file=file) + + +def setup(client): + client.add_cog(ModCommands(client)) \ No newline at end of file diff --git a/files/images/server_icon.png b/files/images/server_icon.png new file mode 100644 index 0000000..0ea70f3 Binary files /dev/null and b/files/images/server_icon.png differ