How do I get the server name from the prompt string?


There was a need to get the name of the server from the line with the invitation link, where this invitation actually leads. I get this line from the form. I use the disnake library (fork , therefore, I indicated it, because there are probably no differences in this regard). How can I actually do this and can I do it at all?

Asked By: Kovirum



You can just use the guild property of an Invite to access the Guild and then get the Name from there.


invite = await bot.fetch_invite("")

This was tested in but it should be the same in disnake.


Answered By: moinierer3000
Categories: questions Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.