
03.12.2022, 01:02
|
|
Участник форума
Регистрация: 21.12.2013
Сообщений: 181
С нами:
6522707
Репутация:
83
|
|
Код:
Код:
import discord
import json
from discord.ext import commands
file = open('config.json', 'r')
config = json.load(file)
bot = commands.Bot(command_prefix=config['prefix'])
intents = discord.Intents.default()# или intents = discord.Intents.all()
client = discord.Client(intents=intents)
@bot.command(name='ping')
async def ping(ctx):
await ctx.send(f'{ctx.author.mention}pong')
bot.run(config['token'])
|
|
|