Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

channel monitoring #4

Open
GeekyDeaks opened this issue Jan 22, 2017 · 9 comments
Open

channel monitoring #4

GeekyDeaks opened this issue Jan 22, 2017 · 9 comments
Assignees
Labels

Comments

@GeekyDeaks
Copy link
Collaborator

Since discord have rate limiting on bots, I was thinking it might be better to log all messages into a file rather than a dedicated channel. What do you think?

@IrealiTY
Copy link
Owner

You sure that applies to bots too? - I mean I never had an error on the Log of the other bot. For convenience sake lol... I'll grant you access on out server so you can see the log of the current variance

@IrealiTY
Copy link
Owner

Access granted to channel #chat-log

@IrealiTY IrealiTY assigned GeekyDeaks and unassigned IrealiTY Jan 23, 2017
@GeekyDeaks
Copy link
Collaborator Author

It's something I hit before when doing the VOC commands as some of the outputs were very large and caused multiple messages to be sent in a short timespan. The newer version of discord.js automatically detects this, but if the bot hits the limit, then it appears to slow down to users as it cannot reply as quickly. Looking at the docs though, it seems the limit is on a per channel basis, so really the limit would probably only apply to the monitoring channel and therefore not really a problem.

https://github.com/hammerandchisel/discord-api-docs/blob/master/docs/topics/Rate_Limits.md

@IrealiTY
Copy link
Owner

That's it interesting. I guess it works at the moment because even though we have " a lot" of messages we never have the case of 1 user posting 10messages in a sec and the bot trying to copy it on the log channel

@GeekyDeaks
Copy link
Collaborator Author

I'll copy the NadekoBot method for the moment as it's still pretty easy, but also log to a file. This way you can figure out which works better

@GeekyDeaks
Copy link
Collaborator Author

Just tidying up the project and closing some issues, but I think this one may not yet be complete. Are there other events you want logged?

@IrealiTY
Copy link
Owner

Hm.. after checking:

pruned users

Discord has a function under server settings -> members > prune members to mass kick players under 3 different conditions, they just get kicked but don't seem to be caught by the User Left monitor

file attachments

I have the feeling they are not triggered (or I simply didnt see em)

Bonus:

name changes
reactions

(the small "emojis below messages)

@GeekyDeaks
Copy link
Collaborator Author

GeekyDeaks commented Apr 21, 2017

Can you remember when you pruned them @IrealiTY ? I'd like to take a look at the logs, since it kicks out an event on my dev server:

2017-04-21T17:31:55.415Z - debug: RAW:  
{ t: 'GUILD_MEMBER_REMOVE',
  s: 10,
  op: 0,
  d: 
   { user: 
      { username: 'NeoSword',
        id: '213360808346910720',
        discriminator: '8202',
        avatar: 'c30c892df32769d3dc73efbea103e62c' },
     guild_id: '302228486121062401' } }
2017-04-21T17:31:55.418Z - info: User Left: NeoSword (213360808346910720)
2017-04-21T17:31:55.421Z - info: NeoSword (<@213360808346910720>) left the CRC

@IrealiTY
Copy link
Owner

I pruned now (9:48 CET) 2 members were removed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants