#How to detect when a user sends a chat message?

1 messages · Page 1 of 1 (latest)

alpine gyro
#

What is the event for when a member/user sends any chat message. (DiSKy)

crystal frost
alpine gyro
#
on message received:
    if message is from guild:
        if author of event-message is not a bot:
            reply with "success"```
#

i tried this

#

and it works except for the third line

#

even tho i say if its not a bot

#

it still sends success in chat

alpine gyro
#

i just did a test and it thinks that its not a bot

#

can you please help me?

fiery bone
#
if author of event-message is a player:
alpine gyro
alpine gyro
fiery bone
#

does it not let u check the users discord roles if thats what your on about

alpine gyro
#

But either it doesn't work or I'm doing it wrong

normal panther
#

@alpine gyro try "bot" instead of "a bot", and if that doesnt work, try checking if the user doesnt have the "Bot" role (you might need to use the tag of the role, like <@...>) (this also implies you give the bots a "Bot" role, and not any other user)

#

I don't know disky at all, so i'm not qualified to give good answers, but you can try and maybe search for those

alpine gyro
#

and yes i did give the bots their own role

normal panther
#

Idk if it's possible

#

Yes, it is possible

#

Probably the first, since it's even a condition and you have examples

#

Try that one out

#

And to get the id of the role (at least on phone) you go any user that has the role you want, in the panel on the right, and you click on it

#

Example:

#

Gives you this:135899390006001664

#

Basically that is the "Unique ID (UID)" of the role called "White Is Boring" in this server.

#

If "Bot" doesn't work as a role in your skript code, you put that number taken from your bot role instead

#

Understood now @alpine gyro?

fiery bone
#

Good answer but I said something similar about that. The only issue is that I think this is also being managed with DMs which means that you can't check the roles. (As bots dont have roles outside of servers)

alpine gyro
#

This works mostly

#

It works if it checks for my admin role but it doesn't work if it's only discluding the bot role

alpine gyro