R Raidor Регистрация 24 Ноя 2013 Сообщения 88 Репутация 0 Спасибо 0 Монет 0 14 Июл 2023 #1 Как сделать удаление сообщения с вызовом команды в боте Discord Python
T ttouktutststk Регистрация 25 Дек 2013 Сообщения 89 Репутация 0 Спасибо 0 Монет 0 14 Июл 2023 #2 Руками
М мит Регистрация 19 Ноя 2013 Сообщения 81 Репутация 1 Спасибо 0 Монет 0 14 Июл 2023 #3 import discord from discord.ext import commands bot = commands.Bot(command_prefix='!') @bot.event async def on_ready(): print(f'Logged in as {bot.user.name}!') @bot.command() async def ping(ctx): await ctx.message.delete() await ctx.send('Pong!') bot.run('your-token-goes-here')
import discord from discord.ext import commands bot = commands.Bot(command_prefix='!') @bot.event async def on_ready(): print(f'Logged in as {bot.user.name}!') @bot.command() async def ping(ctx): await ctx.message.delete() await ctx.send('Pong!') bot.run('your-token-goes-here')