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

[Enhancement] Send error messages in case of incorrect channel IDs or insufficient permissions #192

Closed
3 tasks done
Loved-Ubuntu opened this issue Sep 30, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@Loved-Ubuntu
Copy link

Loved-Ubuntu commented Sep 30, 2023

Checks

Minecraft Version

1.20.1

MC-Discord-Chat Version

2.2.2

Description

Added the jar to the mods folder. Configured the bot like on the page and started the server. As you see the mod says everything is correct and it's finished loading and then it dies.

To Reproduce

Start the server with an channel ID that is wrong.

Log

[17:31:20] [main/INFO]: -----------------------------------------
[17:31:20] [main/INFO]: MC-Discord-Chat (MCDC) 2.2.2
[17:31:20] [main/INFO]: By Xujiayao
[17:31:20] [main/INFO]:
[17:31:20] [main/INFO]: More information + Docs:
[17:31:20] [main/INFO]: https://blog.xujiayao.top/posts/4ba0a17a/
[17:31:20] [main/INFO]: -----------------------------------------
[17:31:20] [main/INFO]: Login Successful!
[17:31:21] [JDA MainWS-ReadThread/INFO]: Connected to WebSocket
[17:31:21] [JDA MainWS-ReadThread/INFO]: Finished Loading!
[17:31:21] [main/ERROR]: java.lang.NullPointerException
        at java.base/java.util.Objects.requireNonNull(Objects.java:209)
        at top.xujiayao.mcdiscordchat.Main.onInitializeServer(Main.java:109)
        at net.fabricmc.loader.impl.entrypoint.EntrypointUtils.invoke0(EntrypointUtils.java:47)
        at net.fabricmc.loader.impl.entrypoint.EntrypointUtils.invoke(EntrypointUtils.java:35)
        at net.fabricmc.loader.impl.game.minecraft.Hooks.startServer(Hooks.java:63)
        at net.minecraft.server.Main.main(Main.java:112)
        at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:468)
        at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74)
        at net.fabricmc.loader.impl.launch.knot.KnotServer.main(KnotServer.java:23)
        at net.fabricmc.loader.impl.launch.server.FabricServerLauncher.main(FabricServerLauncher.java:69)

Config

{
  "generic": {
    "language": "en_us",
    "botToken": "<token>",
    "botPlayingStatus": "Cappuccino SMP: (%onlinePlayerCount%/%maxPlayerCount%)",
    "botListeningStatus": "Cappuccino SMP",
    "useWebhook": true,
    "channelId": "11577150709864981681",
    "consoleLogChannelId": "",
    "updateNotificationChannelId": "",
    "useUuidInsteadOfName": true,
    "avatarApi": "https://mc-heads.net/avatar/%player%.png",
    "broadcastPlayerCommandExecution": true,
    "broadcastSlashCommandExecution": true,
    "announceServerStartStop": true,
    "announcePlayerJoinLeave": true,
    "announceDeathMessages": true,
    "announceAdvancements": true,
    "broadcastChatMessages": true,
    "formatChatMessages": true,
    "allowedMentions": [
      "everyone",
      "users",
      "roles"
    ],
    "useServerNickname": true,
    "discordNewlineLimit": 3,
    "announceHighMspt": true,
    "msptCheckInterval": 5000,
    "msptLimit": 50,
    "whitelistRequiresAdmin": true,
    "notifyUpdates": true,
    "mentionAdminsForUpdates": true,
    "updateChannelTopic": true,
    "channelTopicUpdateInterval": 600000,
    "shutdownImmediately": false,
    "excludedCommands": [
      "/msg",
      "/tell",
      "/tellraw",
      "/w"
    ],
    "adminsIds": []
  },
  "multiServer": {
    "enable": false,
    "host": "127.0.0.1",
    "port": 5000,
    "name": "SMP",
    "botIds": []
  },
  "customMessage": {
    "unformattedResponseMessage": "",
    "unformattedChatMessage": "",
    "unformattedOtherMessage": "",
    "unformattedCommandNotice": "",
    "formattedResponseMessage": "",
    "formattedChatMessage": "",
    "formattedOtherMessage": "",
    "formattedCommandNotice": "",
    "messageWithoutWebhook": "",
    "messageWithoutWebhookForMultiServer": "",
    "serverStarted": "",
    "serverStopped": "",
    "joinServer": "",
    "leftServer": "",
    "deathMessage": "",
    "advancementTask": "",
    "advancementGoal": "",
    "advancementChallenge": "",
    "highMspt": "",
    "offlineChannelTopic": "",
    "onlineChannelTopic": "",
    "onlineChannelTopicForMultiServer": ""
  },
  "latestVersion": "2.2.1",
  "latestCheckTime": 1695791055673
}
@Loved-Ubuntu Loved-Ubuntu added the bug Something isn't working label Sep 30, 2023
@Xujiayao Xujiayao changed the title [Bug] Java crash after message "Finished Loading!" [Bug] Lack error message when channel ID is wrong Oct 1, 2023
@Xujiayao
Copy link
Owner

You may use the latest build.

@Xujiayao Xujiayao added enhancement New feature or request and removed bug Something isn't working labels Oct 27, 2023
@Xujiayao Xujiayao changed the title [Bug] Lack error message when channel ID is wrong [Enhancement] Send error messages in case of incorrect channel IDs or insufficient permissions Oct 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants