PhABC / antiScamBot_slack

Will monitor slack channels to reduce scam potentials and increase user security
MIT License
26 stars 10 forks source link

Error 'members' #17

Closed kkeunen closed 7 years ago

kkeunen commented 7 years ago

Hi there,

I am trying to initialize this bot but I get the error: Antiscam Bot Initiation

Error: 'members'

After that, it restarts and keeps on repeating this error. Does anybody know what I did wrong? I have checked everything multiple times but to no succes. Really don't know what this error message means.

Does anybody have clue?

PhABC commented 7 years ago

So 1-2 people ran in this error so far and it's usually the API returning an error. This could be caused by bad credentials or bad bot permissions, so double check that the tokens are correct and the bot permissions are the one indicated in the readme.md file.

Another possibility is that you might've exceeded the API limit, perhaps by running the bot twice, at the same time? Someone had this issue by running the bot both locally and on a remote machine. One solution to this was to create new tokens, which worked for the person, but another solution would be to wait long enough for the API rate limit to be reset. The former solution might be easier.

If these don't work, you can print what the API call returns by going in the plugins/AntiScam.py script and changing the line return the error (UserList = scBot.api_call("users.list")) to print(scBot.api_call("users.list")). Then, you should see in the console the error that the API returns.

PhABC commented 7 years ago

Did that solve your issue @kkeunen ?

jdg5 commented 7 years ago

We've tried doing the exact same permissions as Monetha did (see attached photo), with the exact same channel setup. However we keep getting the issue when running the python script saying "announcements" a few times and then "members" a few times. Our #announcements channel is our default #general channel renamed and with only Owners/Mods allowed to post, like Monetha do.

Attached is a photo of our permissions and error message. Any help massively appreciated!!

screen shot 2017-09-12 at 23 21 12 screen shot 2017-09-12 at 23 31 52
jdg5 commented 7 years ago

All fixed, we'd named our channel #announcement instead of the plural version. Thanks for this awesome software.

PhABC commented 7 years ago

Ah, sorry, I didn't see this comment! Happy it's working. If you want, tell me the name of your project so I can add it to the list on the README.md file.

jdg5 commented 7 years ago

It's Substratum (substratum.net) I'll get some Eth sent over to you soon as a thank you or perhaps some Sub if you'd like just let me know which.

All the best, James

On 13 Sep 2017, at 16:05, Philippe Castonguay notifications@github.com wrote:

Ah, sorry, I didn't see this comment! Happy it's working. If you want, tell me the name of your project so I can add it to the list on the README.md file.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

PhABC commented 7 years ago

That's really nice of you, thank you. I really dont mind, anything is more than appreciated.

jdg5 commented 7 years ago

Sent a little Sub over. Thank you again for making cryptocurrency safer, it's a big value of ours too.

jdg5 commented 7 years ago

@PhABC We've actually got an issue still with our bot. It still doesn't warn people in their DM that the links could be a scam, only posts to #scam-alert. Is that an option in the bot? Many thanks.

PhABC commented 7 years ago

Thanks for the SUB! Much appreciated.

Unfortunately, a DM is restricted to the two users involved, no one else. The bot could monitor DMs if you would be willing to pay 150$/user/year, which is ludicrous. Hence, make sure all users are in #-scam-alert (use the $inviteAll #-scam-alert- command) and make #-scam-alert- a default channel, so that when new users join your slack they will automatically join this channel.

It is possible that the new slack API will allow DM monitoring, but we will have to wait for that.

On Thu, Sep 14, 2017 at 10:31 AM, James notifications@github.com wrote:

@PhABC https://github.com/phabc We've actually got an issue still with our bot. It still doesn't warn people in their DM that the links could be a scam, only posts to #scam-alert. Is that an option in the bot? Many thanks.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/PhABC/antiScamBot_slack/issues/17#issuecomment-329500722, or mute the thread https://github.com/notifications/unsubscribe-auth/AI4BNkJEfE2rd3u9G0kpdBt11UhEaiQUks5siTizgaJpZM4PRFTV .

jdg5 commented 7 years ago

Ok many thanks for this, we were confused after seeing a Monetha screenshot that showed otherwise but it must have been a mockup. Hopefully Slack will get that API out soon :)

p.s. Sorry for screwing up this thread for the original guy. We had the same issue and to fix it we made sure there was an #announcements channel and #members channel and invited the Anti Scam Bot into both. Then the initialization of the bot worked perfectly. Perhaps the instructions should add a note with those two extra instructions.

PhABC commented 7 years ago

Ah, right. Thanks for the feedback @jnjdg . So the #announcements error is caused by the fact that the Welcoming message refers to this channel. If you modify the welcome message by changing Welcome.txt, you could adjust it so that it refers to the right channels.

The 'members' error isn't caused by the fact that no channel called "members" exists. It's usually caused by the bot sending too many API requests and slack stop sending information. This error usually goes away after sometime but can also be remove if you reset the tokens and use these ones.

Glad it's working however!