27rogi / Fabric2Discord

🤝 Link your Fabric server and Discord with ease!
GNU Lesser General Public License v3.0
13 stars 3 forks source link

Config file will not save #15

Closed Zunwolf1896 closed 1 year ago

Zunwolf1896 commented 1 year ago

I instal the mod, the latest 1.19 version into the server, restartt the server, stop the server, go into the ocnfigs to edit and add bot token etc, save the config restart the server, server crashes check the config file and it has not saved a single thing I did. its saved as settings.conf iniside of configs/f2d/settings.conf

Everytime I start the server it deletes the config and replaces it with a new unedited one making this mod unusable the following is the error I receive when starting the server:

main/ERROR Failed to start the minecraft server 09.10 13:32:02 [Server] INFO java.lang.RuntimeException: Could not execute entrypoint stage 'main' due to errors, provided by 'f2d'! 09.10 13:32:02 [Server] INFO at net.fabricmc.loader.impl.entrypoint.EntrypointUtils.lambda$invoke0$0(EntrypointUtils.java:51) ~[fabric-loader-0.14.9.jar:?] 09.10 13:32:02 [Server] INFO at net.fabricmc.loader.impl.util.ExceptionUtil.gatherExceptions(ExceptionUtil.java:33) ~[fabric-loader-0.14.9.jar:?] 09.10 13:32:02 [Server] INFO at net.fabricmc.loader.impl.entrypoint.EntrypointUtils.invoke0(EntrypointUtils.java:49) ~[fabric-loader-0.14.9.jar:?] 09.10 13:32:02 [Server] INFO at net.fabricmc.loader.impl.entrypoint.EntrypointUtils.invoke(EntrypointUtils.java:35) ~[fabric-loader-0.14.9.jar:?] 09.10 13:32:02 [Server] INFO at net.fabricmc.loader.impl.game.minecraft.Hooks.startServer(Hooks.java:62) ~[fabric-loader-0.14.9.jar:?] 09.10 13:32:02 [Server] INFO at net.minecraft.server.Main.main(Main.java:101) [server-intermediary.jar:?] 09.10 13:32:02 [Server] INFO at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:461) [fabric-loader-0.14.9.jar:?] 09.10 13:32:02 [Server] INFO at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74) [fabric-loader-0.14.9.jar:?] 09.10 13:32:02 [Server] INFO at net.fabricmc.loader.impl.launch.knot.KnotServer.main(KnotServer.java:23) [fabric-loader-0.14.9.jar:?] 09.10 13:32:02 [Server] INFO at net.fabricmc.loader.impl.launch.server.FabricServerLauncher.main(FabricServerLauncher.java:69) [fabric-loader-0.14.9.jar:?] 09.10 13:32:02 [Server] INFO Caused by: java.lang.Error: You must provide Discord API token for this mod to work! 09.10 13:32:02 [Server] INFO at space.ryzhenkov.Fabric2Discord.F2D.onInitialize(F2D.kt:14) ~[Fabric2Discord-1.0.5+1.19.jar:?] 09.10 13:32:02 [Server] INFO at net.fabricmc.loader.impl.entrypoint.EntrypointUtils.invoke0(EntrypointUtils.java:47) ~[fabric-loader-0.14.9.jar:?] 09.10 13:32:02 [Server] INFO ... 7 more

finnnnnnnnnnnnnnnnn commented 1 year ago

I am also having the same issue, which seems to be caused by using webhooks. Setting webhook to anything other than 0 causes the server to crash.

27rogi commented 1 year ago

I am also having the same issue, which seems to be caused by using webhooks. Setting webhook to anything other than 0 causes the server to crash.

Can you provide server logs?

finnnnnnnnnnnnnnnnn commented 1 year ago

https://pastebin.com/wU1E7YTD

27rogi commented 1 year ago

https://pastebin.com/wU1E7YTD

Error message REST request returned an error: 400 Bad Request Invalid Form Body {"name":{"_errors":[{"code":"USERNAME_INVALID_CONTAINS","message":"Username cannot contain \"discord\""}]}} clearly says that you are trying to use bot or webhook with username discord, try changing it to something else 🤔

finnnnnnnnnnnnnnnnn commented 1 year ago

I don't really know what to change, my bot is named Minecraft Link, and so is my webhook. Is there something in the bot's config file I should change? I don't see anything.

finnnnnnnnnnnnnnnnn commented 1 year ago

Also, @Zunwolf1896 it looks like your issue is caused by you not configuring the mod correctly. You need to add an API token, as it states in the output log: You must provide Discord API token for this mod to work! The instructions are here: https://github.com/rogi27/Fabric2Discord/wiki/Getting-Started

EDIT: Just realized you said you couldn't change the config file. Nevermind.

27rogi commented 1 year ago

I don't really know what to change, my bot is named Minecraft Link, and so is my webhook. Is there something in the bot's config file I should change? I don't see anything.

Could you try to create another bot and use it's token and check if mod works? Also I remember that mod can automatically generate webhooks when webhook is set to -1

27rogi commented 1 year ago

Closing this issue because there's no more activity and new info.