hypherionmc / sdlink

A simple to use Minecraft to Discord Chat linker with Whitelisting
MIT License
23 stars 7 forks source link

"Could not initialize bot. Could not load config or your Bot Token is missing. Bot will be disabled" even though i am 110% sure the token is correct. #91

Closed catlovelia closed 5 months ago

catlovelia commented 1 year ago

ive tried again and again, making new bots, changing channels, nothing is working and ive been trying for 5 hours. i give up. please help me.

hypherionmc commented 1 year ago

What version are you on, what mc version are you using, what is the full error from the log.

I can't help without that information, as I have no way of knowing what's going on, on your server

catlovelia commented 1 year ago

[14:55:22] [main/INFO]: Loading Minecraft 1.19.2 with Fabric Loader 0.14.22 [14:55:22] [ForkJoinPool-1-worker-3/WARN]: Mod letmedespawn uses the version fabric-1.0.2 which isn't compatible with Loader's extended semantic version format (Could not parse version number component 'fabric'!), SemVer is recommended for reliably evaluating dependencies and prioritizing newer version [14:55:22] [main/WARN]: Warnings were found!

catlovelia commented 1 year ago

Bold is server information, italic is the error Edit: the bolding didnt seem to work but im sure you can find it

hypherionmc commented 1 year ago

Sorry for the late response, your response came through after I went to bed.

Can you share your config file please? Just replace some random characters in your bot token to make it invalid, and if you use webhooks, please remove their urls

catlovelia commented 1 year ago
#General Mod Config
[general]
    #Should the bot be enabled or not
    enabled = true
    #Should debug logging be enabled? WARNING: THIS CAN SPAM YOUR LOG!
    debugging = false
    #Should the bot be allowed to whitelist/un-whitelist players. Whitelisting needs to be enabled on your server as well
    whitelisting = false
    #Should the bot be allowed to whitelist/un-whitelist players in OFFLINE mode. Whitelisting needs to be enabled on your server as well
    offlinewhitelist = false
    #Automatically link Minecraft and Discord Accounts when a user is whitelisted
    linkedWhitelist = false
    #Should only admins be allowed to whitelist players
    onlyAdminsWhitelist = false
    #If a role ID (or name) is defined here, it will be assigned to players when they are whitelisted
    autoWhitelistRole = ""
    #Modify user nickname when their accounts are linked
    modifyNickname = false
    #If a role ID (or name) is defined here, it will be assigned to players when their MC and Discord accounts are linked
    linkedRole = ""
    #Should the /discord command be enabled in game
    inviteCommandEnabled = false
    #Discord Invite Link used by the in-game invite command
    inviteLink = ""
    #Internal version control. DO NOT TOUCH!
    configVersion = 25

#Config specific to the discord bot
[botConfig]
    #The Token of the Bot to use. KEEP THIS PRIVATE. See https://readme.firstdarkdev.xyz/simple-discord-link/initial-setup/ to find this
    botToken = "nuh uh."
    #How quickly the bot status should update
    activityUpdateInterval = 1
    #If a role ID (or name) is defined here, only members with this role can use Staff Functions. Otherwise, it defaults back to admin/kick perms
    staffRole = ""
    #Should the bot use / commands. NOTE: THIS MAY TAKE UP TO 24 HOURS TO SHOW UP IN YOUR DISCORD
    slashCommands = false
    #The prefix to use for bot commands. Example: ~players. THIS HAS NO EFFECT WHEN USING SLASH COMMANDS
    # - WARNING: TEXT COMMANDS HAVE BEEN DEPRECATED, USE SLASH COMMANDS INSTEAD!!
    botPrefix = "~"
    #Do not add Playing. A status to display on the bot. You can use %players% and %maxplayers% to show the number of players on the server
    botStatus = "Minecraft"
    #The type of the status displayed on the bot. Valid entries are: PLAYING, STREAMING, WATCHING, LISTENING
    botStatusType = "PLAYING"
    #The URL that will be used when the "botStatusType" is set to "STREAMING", required to display as "streaming".
    botStatusStreamingURL = "https://twitch.tv/twitch"
    #Should the bot update the topic of your chat channel automatically
    doTopicUpdates = true
    #A topic for the Chat Relay channel. You can use %player%, %maxplayers%, %uptime% or just leave it empty.
    channelTopic = "Playing Minecraft with %players%/%maxplayers% people | Uptime: %uptime%"

#Config relating to the discord channels to use with the mod
[channels]
    #The ID of the channel to post in and relay messages from. This is still needed, even in webhook mode
    chatChannelID = nope.
    #If this ID is set, event messages will be posted in this channel instead of the chat channel
    eventsChannelID = 0
    #If this ID is set, console messages sent after the bot started will be relayed here, and you can execute minecraft commands here
    consoleChannelID = still not happenin

#Webhook Config
[webhooks]
    #Should webhook messages be used
    enabled = false
    #The URL of the channel webhook to use for Chat Messages
    chatWebhook = ""
    #The URL of the channel webhook to use for Server Messages
    eventsWebhook = ""
    #The URL of the channel webhook to use for Console Messages
    consoleWebhook = ""
    #A DIRECT link to an image to use as the avatar for server messages. Also used for embeds
    serverAvatar = ""
    #The name to display for Server messages when using Webhooks
    serverName = "Minecraft Server"

#Chat Config
[chat]
    #The type of image to use as the player icon in messages. Valid entries are: AVATAR, HEAD, BODY, COMBO
    playerAvatarType = "HEAD"
    #Prefix to add to Minecraft when a message is relayed from Discord. Supports MC formatting. Use %user% for the Discord Username
    mcPrefix = "§e[Discord]§r %user%: "
    #Should messages from bots be relayed
    ignoreBots = true
    #Should SERVER STARTING messages be shown
    serverStarting = true
    #Should SERVER STARTED messages be shown
    serverStarted = true
    #Should SERVER STOPPING messages be shown
    serverStopping = true
    #Should SERVER STOPPED messages be shown
    serverStopped = true
    #Should the chat be relayed
    playerMessages = true
    #Should Join and Leave messages be posted
    joinAndLeaveMessages = true
    #Should Advancement messages be posted
    advancementMessages = true
    #Should Death Announcements be posted
    deathMessages = true
    #Should Messages from the /say command be posted
    sendSayCommand = true
    #Should commands be posted to discord
    broadcastCommands = true
    #Commands that should not be broadcasted to discord
    ignoredCommands = ["particle", "login"]

#Change the contents of certain event messages
[messages]
    #Convert Discord to MC, and MC to Discord Formatting
    formatting = true
    #Should console messages be sent to the Console Channel
    sendConsoleMessages = true
    #Server Starting Message
    serverStarting = "*Server is starting...*"
    #Server Started Message
    serverStarted = "*Server has started. Enjoy!*"
    #Server Stopping Message
    serverStopping = "*Server is stopping...*"
    #Server Stopped Message
    serverStopped = "*Server has stopped...*"
    #Player Joined Message. Use %player% to display the player name
    playerJoined = "*%player% has joined the server!*"
    #Player Left Message. Use %player% to display the player name
    playerLeft = "*%player% has left the server!*"
    #Achievement Messages. Available variables: %player%, %title%, %description%
    achievements = "*%player% has made the advancement [%title%]: %description%*"
    #Chat Messages. Available variables: %player%, %message%
    chat = "%message%"
    #Command Messages. Available variables: %player%, %command%
    commands = "%player% **executed command: %command%**"
    #Should messages sent with TellRaw be sent to discord as a chat? (Experimental)
    relayTellRaw = true
    #Should the entire command executed be relayed to discord, or only the name of the command
    relayFullCommands = false
    #The message to show when someone uses /discord command. You can use %inviteurl%
    inviteMessage = "Hey, check out our discord server here -> %inviteurl%"

#Change in which channel messages appear
[messageDestinations]

    #Control where CHAT messages are delivered
    [messageDestinations.chat]
        #The Channel the message will be delivered to. Valid entries are CHAT, EVENT, CONSOLE
        channel = "CHAT"
        #Should the message be sent using EMBED style messages
        useEmbed = false

    #Control where START/STOP messages are delivered
    [messageDestinations.startStop]
        #The Channel the message will be delivered to. Valid entries are CHAT, EVENT, CONSOLE
        channel = "EVENT"
        #Should the message be sent using EMBED style messages
        useEmbed = false

    #Control where JOIN/LEAVE messages are delivered
    [messageDestinations.joinLeave]
        #The Channel the message will be delivered to. Valid entries are CHAT, EVENT, CONSOLE
        channel = "EVENT"
        #Should the message be sent using EMBED style messages
        useEmbed = false

    #Control where ADVANCEMENT messages are delivered
    [messageDestinations.advancements]
        #The Channel the message will be delivered to. Valid entries are CHAT, EVENT, CONSOLE
        channel = "EVENT"
        #Should the message be sent using EMBED style messages
        useEmbed = false

    #Control where DEATH messages are delivered
    [messageDestinations.death]
        #The Channel the message will be delivered to. Valid entries are CHAT, EVENT, CONSOLE
        channel = "EVENT"
        #Should the message be sent using EMBED style messages
        useEmbed = false

    #Control where COMMAND messages are delivered
    [messageDestinations.commands]
        #The Channel the message will be delivered to. Valid entries are CHAT, EVENT, CONSOLE
        channel = "EVENT"
        #Should the message be sent using EMBED style messages
        useEmbed = false

#Enable or Disable certain bot commands
[botCommands]
    #Allow members to link their MC and Discord accounts
    accountLinking = true
    #Enable/Disable the Player List command
    allowPlayerList = true
    #Enable/Disable the Server Status command
    allowServerStatus = true

#Execute Minecraft commands in Discord
[linkedCommands]
    #Should linked commands be enabled
    enabled = false
    #Commands to be linked
    commands = []
hypherionmc commented 1 year ago

Reason I asked to keep the token intact, but change some random numbers, is to see if you were using the correct one.

If your token doesn't look like this OTA1NDEyMzEyOTUxODQ5MDEw.Gr1ie6.72gPskqxrfLcYW3xqTSc9dO6cLSwszXYYmQgOw, it's wrong.

If it looks like this: 905412312951849010 -> Wrong If it looks like this: 93384c194fbd366c57df2d3531f4fcc8982696748daf3a36204f1b2bde606895 -> Wrong

(Notice, none of these are real values)

It has to match the format shown above. It's found here: image

catlovelia commented 1 year ago

it has both numbers and letters, thats for certain I am, once again, 110% sure the bot token is correct

hypherionmc commented 5 months ago

To this day, I still don't know what caused this, nor has anyone else reported this happening again.

The newer versions should have additional logging now for config loading errors that could cause this, instead of just saying the token is invalid or missing.

I'm going to go ahead and close this for now (just to clean up our active issues a bit). If you are still a user of this mod, or ever plan on doing so again (which I don't blame you if you won't) and this issue occurs again, please let us know