Skip to content
Discussion options

You must be logged in to vote

You have the pieces already here.
But you are not giving enough context to help you.
The original code does what you want. It will edit the nickname of a server member when done inside a guild.
To protect against it being used outside of a guild (server) you can use the decorator @guild_only.
Discord expects you to give a response to the modal submission.
Editing a user is not a response in regards to the interaction, (discord doesn't know that you did that edit because of the submit button click in the modal) you need to do something with the interaction.response. Something you could do is doing interaction.response.send_message("Changed your nickname", ephemeral=True) to show a message …

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@k3nnyburger
Comment options

@tailoric
Comment options

@k3nnyburger
Comment options

@tailoric
Comment options

Answer selected by k3nnyburger
@k3nnyburger
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants