R
R
RageLord2021-10-08 14:57:42
Bots
RageLord, 2021-10-08 14:57:42

Is there a function in discord.py that is responsible for reporting a user/server?

I want to write a self-bot that will send complaints to a specific server/user, is it possible to do this?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Z
Zagir Majidov, 2021-10-08
@Zagir-vip

hello, there is no such function, but it can be written.
here is the code

@client.command(aliases = ['репорт']) #aliases это список название для команды
async def report(ctx, *, message):
channel = discord.uttils.get(ctx.guild.TextChannels, name = 'название канала') 
await channel.send(f'новая жалоба\n{message} ') 
await ctx.send('жалоба отправлена', delete_after = 5)

вот пример кода. Улучшите его с помощью embed. 
поправьте табуляцию, так как с телефона писать не легко.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question