Merge pull request #15 from victormylle/say

Say
This commit is contained in:
Stijn De Clercq
2020-09-29 23:37:08 +02:00
committed by GitHub
2 changed files with 29 additions and 0 deletions

29
cogs/modcommands.py Normal file
View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 171 KiB