Closed washhtubs closed 1 year ago
Something about the way you entered your token or the way it is in the yaml made it invalid. You might also need to regenerate it.
I'll look into the dependency issue
I've regenerated my token and followed the steps in the set-up again and am getting the same console outputs.
Could you send the config yaml and replace the token characters and VC ID with X's? (Keep the periods)
Sure:
#
#
#
#
#
debug_level
option helpful.#
bots:
This is what the file looks like in a text editor:
I might've located the problem. It may be an issue with JDA, but it seems that the first part of the token (base64 of user ID iirc, so nothing sensitive) has 2 more characters than that part of one of the tokens I used for testing. This may be because of the bot being created more recently.
The issue with the voicechat dependency is also fixed, I just forgot to mention it
Right, that makes sense. Is there an easy way to fix this?
I'll ask in the JDA discord server, I'm pretty sure the first part of the token is user ID encoded in base64 which means it's nothing sensitive. If you want to DM it to me on Discord or something instead of posting here, it would be very helpful (and you can always regenerate the token after sharing the first part to invalidate the old one)
Yeah for sure, what's your discord info?
Just naturecodevoid with the new usernames
Also, some people from the JDA discord server responded. JDA does not validate tokens, Discord is saying the token is invalid when attempting to login to the bot. So something about your token is incorrect. It's also possible that some hidden whitespace is being added to the token due to you being on windows, so I'll add a .trim(). Tell me if that fixes it (however, the fix won't be available for a few more days since I'm currently in the middle of a big refactor)
Could you try updating to 2.0.0 and see if that fixes the issue?
Updating to 2.0.0 works, which is great, thank you very much. Although, when a few console players on my server run /dvc start they are booted from the server. I don't think that's an issue with the mod though as I wasn't able to replicate it
I have just finished setting up this mod for the first time and have completed the setup instructions and restarted my server and reloaded the configs etc. On server startup, the server recognised that there was one bot and that the debug mode was set to level 1:
09.06 22:50:13 [Server] Thread-17/[INFO] Using 1 bot 09.06 22:50:13 [Server] Thread-17/[INFO] Debug mode has been set to level 1
However, in my discord server, the bot is offline, and running the command /dvc start gives this message in the console:
09.06 22:50:38 [Server] Thread-18/[ERROR] Failed to login to the bot using vc_id 861688883246137344 09.06 22:50:38 [Server] [INFO] dev.naturecodevoid.voicechatdiscord.shadow.jda.api.exceptions.InvalidTokenException: The provided token is invalid! 09.06 22:50:38 [Server] [INFO] at dev.naturecodevoid.voicechatdiscord.shadow.jda.internal.JDAImpl.verifyToken(JDAImpl.java:414) ~[voicechat-discord-fabric-2.0.0-beta-nightly.c836c4436ec4f47b8c13f7c0d9fbc9fe165c2938.jar:?] 09.06 22:50:38 [Server] [INFO] at dev.naturecodevoid.voicechatdiscord.shadow.jda.internal.JDAImpl.login(JDAImpl.java:331) ~[voicechat-discord-fabric-2.0.0-beta-nightly.c836c4436ec4f47b8c13f7c0d9fbc9fe165c2938.jar:?] 09.06 22:50:38 [Server] [INFO] at dev.naturecodevoid.voicechatdiscord.shadow.jda.internal.JDAImpl.login(JDAImpl.java:297) ~[voicechat-discord-fabric-2.0.0-beta-nightly.c836c4436ec4f47b8c13f7c0d9fbc9fe165c2938.jar:?] 09.06 22:50:38 [Server] [INFO] at dev.naturecodevoid.voicechatdiscord.shadow.jda.api.JDABuilder.build(JDABuilder.java:1828) ~[voicechat-discord-fabric-2.0.0-beta-nightly.c836c4436ec4f47b8c13f7c0d9fbc9fe165c2938.jar:?] 09.06 22:50:38 [Server] [INFO] at dev.naturecodevoid.voicechatdiscord.DiscordBot.login(DiscordBot.java:99) ~[voicechat-discord-fabric-2.0.0-beta-nightly.c836c4436ec4f47b8c13f7c0d9fbc9fe165c2938.jar:?] 09.06 22:50:38 [Server] [INFO] at dev.naturecodevoid.voicechatdiscord.SubCommands.lambda$register$0(SubCommands.java:62) ~[voicechat-discord-fabric-2.0.0-beta-nightly.c836c4436ec4f47b8c13f7c0d9fbc9fe165c2938.jar:?] 09.06 22:50:38 [Server] [INFO] at java.lang.Thread.run(Thread.java:831) ~[?:?] 09.06 22:50:38 [Server] Thread-18/[ERROR] Tried to start audio transfer system but the bot has not been logged into. Please report this on GitHub Issues!
I've double checked the Token ID and VC ID to make sure they are right, and they are, so I'm not sure why it's saying it's invalid.
In the voicechat-discord.yml file the vc_id is written in orange, the same as the debug_level, but the token is written in black.
Also, when starting the server for the first time, the console reported that voicechat-discord was incompatible with "voicechat 1.19.4-2.4.9" and to replace it with "voicechat 2.4.8 or higher". I got around this by changing the "voicechat" dependency value in the fabric.mod.json file:
"depends": { "fabricloader": ">=0.14.10", "fabric-api": "*", "minecraft": ">=1.19.2", "java": ">=17", "voicechat": ">=1.19.4-2.4.9"
Any thoughts or solutions would be greatly appreciated.
PS This mod is really cool, thank you very much for the work you've put in :)