Add admin command to send a message

This commit is contained in:
Yohann D'ANELLO 2021-10-26 23:18:53 +02:00
parent 27e7b70295
commit 47aa7ace33
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85

View File

@ -1,6 +1,5 @@
import disnake import disnake
from disnake import CategoryChannel, PermissionOverwrite, TextChannel from disnake import CategoryChannel, PermissionOverwrite, TextChannel
from disnake.errors import InvalidData
from disnake.ext import commands from disnake.ext import commands
import logging import logging
@ -152,6 +151,13 @@ async def on_ready():
config.save() config.save()
@bot.command()
@commands.has_permissions(administrator=True)
async def send(ctx: commands.Context, *, message: str):
await ctx.message.delete()
await ctx.send(message)
@bot.command() @bot.command()
async def vote(ctx: commands.Context): async def vote(ctx: commands.Context):
view = Confirm() view = Confirm()