Answer the question
In order to leave comments, you need to log in
How to return the server name in a private message of a discord bot?
There is this code:
if message.content.startswith('$info'):
await message.author.send('Ты находишься на сервере {message.server.name}!')
Answer the question
In order to leave comments, you need to log in
Try like this:
message.author.send(f'Ты находишься на сервере {message.server.name}!')
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question