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))