G
G
gollasd2022-02-01 18:03:27
Python
gollasd, 2022-02-01 18:03:27

Why is the message not being sent?

Help fix the problem!
Messages are not sent, I want messages to be displayed after receiving information in the chat console.

import discord
from discord.ext import commands

class givestajer(commands.Cog):
    def __init__(self, client):
        self.client = client
        print('[COGS]: Команда "givestajer" была успешно запущена!')

        @client.command(aliases = ['стажерка'])
        @commands.cooldown(1, 1, commands.BucketType.user) # заддержка на использование команды
        async def givestajer(self, ctx, user = None, reason = None):
            console = client.get_chanel(937357211393458186)
            if user is None:
                return await self.send('Укажите ник игрока')
            else:
                await ctx.send('Привилегия: Stajer, была успешно выдана игроку {user}. Причина: {reason}')
                await console.send(f'lp user {user} parent set stajer')

            await ctx.message.add_reaction('✅')

def setup(client):
    client.add_cog(givestajer(client))

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Nesterov, 2022-02-01
@AlexNest

Who is connected in the main file?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question