Eddiebot: Bot gets 'High value' role

Created on 17 Aug 2020  路  8Comments  路  Source: EddieJaoudeCommunity/EddieBot

bug
Bot gets high value role when it recieves 5 or more emoji reactions

bug good first issue

Most helpful comment

Mine was a rough / quick sudo example, so I am sure @alrifay is correct 馃憤 (plus he is always correct but don't let him know I said that 馃槀 )

All 8 comments

Hi @srinath1412001, thanks for raising this issue!

In fact, we could check if the user that is being assigned that role (or any role) is not a bot. I think we could even specify the change to be made in the issue description and add the "good first issue" label since it's a small change to do. What do you think @eddiejaoude ?

Also, @eddiejaoude do we consider this a bug or is there any problem bots having these roles?

Thanks for raising @srinath1412001 .

Good points @BOLT04 . I don't think there is an issue with a bot having these roles because the bot has a high role. But feels a bit dirty. In some other code we ignore it if it is a bot, we should do the same here too.

I think it is a bug, and you are right, it would make a good first issue 馃憤

From example above..

if (message.author.bot) {
        return;
    }

I think it should go here https://github.com/EddieJaoudeCommunity/EddieBot/blob/develop/src/messageReactionAdd.ts#L31

i think it should be like this because we don't have the message object.
ts if (reaction.message.author.bot) { return; }
And i think it should go in line _39_ not _31_ to make sure that we have the message if the reaction object is partial.
https://github.com/EddieJaoudeCommunity/EddieBot/blob/28a795894e64af81b2e33e7b1082e099a4ce053e/src/messageReactionAdd.ts#L31-L40

Mine was a rough / quick sudo example, so I am sure @alrifay is correct 馃憤 (plus he is always correct but don't let him know I said that 馃槀 )

Stale issue message

Stale issue message

Was this page helpful?
0 / 5 - 0 ratings