#it is an option should be selected from
1 messages · Page 1 of 1 (latest)
hello
you can set it with a slash command, but will need a way to save it
the slash command cannot access the client event you use unvrole in
so should i use it's id ?
Is this guildMemberAdd event inside of the interactionCreate event?
If thats a constant
thats incredibly bad practice if so
The issue is that the event doesnt know that id
Thats why i am asking, since he got the result and vscode shows it as defined
Ahh
gotchu
you can save the id in a file or hardcode in the file you have the event in
changing it with a slash command i would recommend writing to a file, that way you wont have to do it everytime the bot reloads
Or databases, or store it in the client as a value and change the value in another file
yea db is writing to a file but then more advanced xd
bruh i did run the command , it says : missing perms
• Bots cannot moderate (kick/ban/nickname/...) a target with a higher or equally high highest role or the guild owner.
• Bots cannot modify (edit/add/remove) roles that are higher or equally high compared to the bot's highest role.
• The ADMINISTRATOR permission does not skip these checks.
@slow pond working now
Eyyyy nice
@west plover working now
whatd you do
thank you guys
yeah
1m
the event shouldnt be able to access it unless you made it a global variable
yup
umm i have another question
client.on('interactionCreate', interaction => {
if ( author : interaction.user && interaction.customId == 'true') {
}
this is absolutly wrong
how do i make it so if the user who used the command he can only use the button
" user " is the person who used the command
Use a filter like this
m => m.author.id == interaction.user.id
although thats code to distinguish a message being sent after a slash command interaction
its a filter
so in the code where i handle the command
i put this code
which awaits a message
this command has many buttons .. so when i click on them they don't work
only you want to await a buttonpress, so you can try to set up a collector or see if you can create a database or something
@west plover can i use " ephemeral " in a message has buttons ?
You can reply to an interaction with buttons and ephemeral: true yes