Discord code

Discord code

Liksa
import discord
from discord.ext import commands

config = {
    'token' : 'MTAyOTcwMDU2OTU0MTEyNDA5Ng.GC2Hpz.g-O167GAIK89k_Yh41qbicxuo72udPCwJXja9c',
    'prefix': '!',
}
intents = discord.Intents.all()
bot = commands.Bot(command_prefix=config['prefix'], intents=intents)

@bot.event
async def on_ready():
    game = discord.Game('moderating')
    await bot.change_presence(status=discord.Status.online, activity=game)

@bot.command(name="привет")
async def hi(ctx):
    author = ctx.message.author
    await ctx.send(f'Привет воин {author.mention}!')



bot.run(config['token'])


Report Page