Hello everyone
I connected incoming form data via webhook to the Discord Module.
The task is to take the discord Username e.g. YAYJAY#7373 and add it to a Role.
I get an error. [400] Invalid Form Body
Any help appreciated, thanks
Hello everyone
I connected incoming form data via webhook to the Discord Module.
The task is to take the discord Username e.g. YAYJAY#7373 and add it to a Role.
I get an error. [400] Invalid Form Body
Any help appreciated, thanks
Thanks for your reply
The Add a Role to a Guild Member
I think the issue is that I am sending in the User Name and not the Discord ID.
I have since learned that the Discord ID is a unique number
whereas the username is vanity and can be changed at any time.
My form is for a community server and we collect the Username, not the Discord ID.
It seems I need to find a way to either look up the Discord ID from the Username and then feed that into the Add Member module or I need to collect the Discord ID on the form.
The latter is harder cause its kind of hidden and most people don’t know how to find it so it requires user instruction while they fill out the form.
According to the Discord documentation, you indeed need the ID of the user and not the combination of username#discriminator. Discord Developer Portal
I assume this is causing the issue.
To resolve this issue, you have the following option:
Look up the Discord ID from the username using the List Guild Members module and then feed that into the Add a Role to a Guild Member module. You can create a map()
function to parse the ID of the respective user.
Hope this helps you.
Glenn - Callinetic
Thanks again for confirming. I haven’t figured it out yet.
My webhook bring in the data as username#discriminator.
The List Guild Members returns the data like “82483471108276224 | Toby” concatenating the Discord ID and the username, without the discriminator.
Any ideas on how I parse down my data to just the username left of the # and then match that to the Used ID that is coming back from the List Guild Members
Is that even possible?
Hey there !
I’ve got the same problem but, with many test, I found something that work, for now !
I ask the user tag or username to the member of my communities with a google form. Your webhooks does the same, I imagine ?
So, what I did was to get the variables in the list guild member, and make a string, and with this string ( the username + the discriminator ), compare it to the username I get in my form with a filter. THEN I take the user ID from the variable whose been compared.
Written, that make no sens.
But it work !
Here my scenario, the filter and my setting:
Don’t forget to get the role of the bot ( yours or/and the integromat/make bot ) on your discord server at the top of the list of the roles, to be sure to not get a 403 error for the permission.
I’m super aware that it’s not perfect and I take any advices or suggestions
Hey @Aimee_D
Thank you so much, I am going to try and follow this approach tomorrow.
You are also a crypto community?
Hope will work for you, @Leadio
And nope, not at all ! I’m in the gamification process for a online challenge for my creative community.
The error message “Invalid Form Body” typically indicates that there is an issue with the format or structure of the data you are sending in your request to add a member to a Discord role from a form. Here are a few potential causes and solutions to consider:
If you are still experiencing difficulties, it may be helpful to review the official Discord API documentation or seek assistance from the Discord developer community for more specific guidance related to your implementation.