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

Second Bot not running? #165

Closed
OriginalFlavor opened this issue Oct 17, 2020 · 4 comments
Closed

Second Bot not running? #165

OriginalFlavor opened this issue Oct 17, 2020 · 4 comments

Comments

@OriginalFlavor
Copy link

ver amongusdiscord-2.3.2
AmongUsCapture-2.4.1
I don't think my second bot is connected to the game.

When I start the bot in discord (au -n), I get a direct message with a link from my first bot. I do not get a direct message from the second bot.

My output from the amongusdiscord window follows. I replaced private info with asterisks .

You can see in line 2, amongusdiscord recognizes that the final.txt has a 2nd Discord Bot Token.

In the last line, amongusdiscord indicates that it is waiting 1 secs to update...
Does that "waiting" message indicate that the second bot is not running?

I reference prior thread #154 Which seems to be unresolved.

2020/10/17 17:53:05 2.3.2-Prerelease
2020/10/17 17:53:05 You provided a 2nd Discord Bot Token, so I'll try to use it
2020/10/17 17:53:05 [Info] Invalid or no particular PORT (range [1024-65535]) provided. Defaulting to 8123
2020/10/17 17:53:05 [Info] No valid SERVER_URL provided. Defaulting to http://localhost
2020/10/17 17:53:05 [Info] No EXT_PORT provided. Defaulting to PORT
2020/10/17 17:53:05 Using ./ as the base path for config
2020/10/17 17:53:05 Success in initializing the local Filesystem as the Storage Driver
2020/10/17 17:53:05 Bot is now running.  Press CTRL-C to exit.
2020/10/17 17:53:06 Successfully loaded config from storagedriver for *************
2020/10/17 17:53:06 Added to new Guild, id *************, name *************
2020/10/17 17:53:06 [This is not an error] No explicit guildID provided for emojis; using the current guild default
2020/10/17 17:53:06 Serving at localhost:8123...
2020/10/17 17:54:04 D9FD4EF3
2020/10/17 17:54:04 Added self game state message
2020/10/17 17:54:18 connected: 1
2020/10/17 17:54:18 Received connection code: "D9FD4EF3"
2020/10/17 17:54:18 Associated websocket id 1 with guildID ************* using code D9FD4EF3
2020/10/17 17:54:18 Waiting 1 secs to update the status message to not be rate-limited
2020/10/17 17:54:18 phase received from capture:  0
2020/10/17 17:54:18 Pushing phase event to channel
2020/10/17 17:54:18 Received PhaseUpdate message for guild *************
2020/10/17 17:54:18 Detected transition to Lobby
2020/10/17 17:54:18 player received from capture:  {"Action":4,"Name":"Loren","IsDead":false,"Disconnected":false,"Color":5}
2020/10/17 17:54:21 Received PlayerUpdate message for guild 764249003810357268
2020/10/17 17:54:21 Added new player instance for Loren
2020/10/17 17:54:21 Waiting 1 secs to update the status message to not be rate-limited
2020/10/17 17:54:21 lobby: {"LobbyCode":"SWZXYQ","Region":0}
2020/10/17 17:54:21 Received room code {"LobbyCode":"SWZXYQ","Region":0} for guild *************from capture
2020/10/17 17:54:21 Received PhaseUpdate message for guild 764249003810357268
2020/10/17 17:54:42 phase received from capture:  3
2020/10/17 17:54:42 Pushing phase event to channel
2020/10/17 17:54:42 Received PhaseUpdate message for guild *************
2020/10/17 17:54:42 Detected transition to Menu
2020/10/17 17:54:42 Waiting 1 secs to update the status message to not be rate-limited
@mLgz0rn
Copy link

mLgz0rn commented Oct 19, 2020

As I understand, the second bot only works as a helper for the first bot, to help muting/unmuting people to avoid being ratelimited so that mutes and unmutes dosnt take forever when playing more than 7-8 players.
If the second bot is online in your discord, it is working as it should

@denverquane
Copy link
Collaborator

^ @mLgz0rn is right, the second bot is only a "worker" bot that issues 1/2 the mute/deafen requests. Not sure what the functionality would entail for having 2 bots that both respond to .au new.... Why would you want a second bot that also acknowledges all the commands as the first bot, with 100% overlap?

@OriginalFlavor
Copy link
Author

@mLgz0rn Sounds good.
How would you test if the second bot is working correctly?
Create a game with 9+ players and watch for ratelimiting? How do I know if I am being rate limited?
Looking at my log now, it says, "Waiting 1 secs to update the status message to not be rate-limited."
Is 1 sec a short amount of time? (it sounds short.)
How long would the delay be if I had 9+ players and no second bot?

@denverquane
Copy link
Collaborator

@OriginalFlavor
Yes, testing with 9+ players is the easiest way to test. If you see users being muted/deafened or unmuted/undeafened later than others, by a couple seconds, that's usually the cause.

And firstly, I believe those logs are from an older version... I recommend updating. But they also have nothing to do with the rate limit for muting/deafening. The logs are purely for indicating if the status message for the bot should be updated right away; I slowed down the updating by 1 second (which actually makes a huge difference) to prevent it from blowing past the limit, when the status message really doesn't need to update more than once a second, anyways.

And the delay for 9+ players w/ no 2nd bot is sometimes less than 2-3 seconds, but can be as bad as 5-10 seconds for some players. Discord dynamically adjusts their rate limits, so there's no way of saying for certain

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

No branches or pull requests

3 participants