[Bug]: Failed to get channel with ID
datenshi888 opened this issue · 8 comments
What happened?
Updated to 2.4.7 version of the mod for 1.18.2 and started having this issue. Using it in the All The Mods 7 modpack (unmodified aside from DiscordIntegration).
[15:09:45] [Server thread/ERROR] [Discord-Integration-Core/]: Failed to get channel with ID '335616879760637975', falling back to default channel [15:09:45] [Thread-37/ERROR] [Discord-Integration-Core/]: Failed to get channel with ID '335616879760637975', falling back to default channel > java.lang.IllegalStateException: Channel does not exist, check channel ID and bot permissions on both channel and category at TRANSFORMER/[email protected]/de.erdbeerbaerlp.dcintegration.common.storage.CommandRegistry.updateSlashCommands(CommandRegistry.java:36) at TRANSFORMER/[email protected]/de.erdbeerbaerlp.dcintegration.common.Discord.lambda$startThreads$9(Discord.java:385) at java.base/java.lang.Thread.run(Thread.java:833) [15:09:45] [Thread-37/ERROR] [Discord-Integration-Core/]: Failed to register slash commands! Please re-invite the bot to all servers the bot is on using this link: https://discord.com/oauth2/authorize?client_id=735684153219088486&scope=applications.commands%20bot&permissions=2953964624
Happens with the previous config that worked with no issue on the older version and also on a freshly generated and edited config.
I have confirmed the channel exists and the id is correct and that the bot has necessary permissions.
Server still boots fine with this issue present.
Game Version
Other
What platform are you using?
Forge
Platform version
40.1.68
Config File
# General options for the bot
[general]
# Insert your Bot Token here!
# DO NOT SHARE IT WITH ANYONE!
botToken = "REMOVED"
# The channel ID where the bot will be working in
botChannel = "335616879760637975"
# The bot's status message
#
# PLACEHOLDERS:
# %online% - Online Players
# %max% - Maximum Player Amount
botStatusName = "%online% players Online"
# Type of the bot's status
# Allowed Values: DISABLED,PLAYING,WATCHING,LISTENING,STREAMING,COMPETING
botStatusType = "STREAMING"
# URL of the bot's stream when using the status type 'STREAMING'
# Has to start with https://twitch.tv/ or https://www.youtube.com/watch?v=
streamingURL = "REMOVED"
# Enable checking for updates?
# Notification will be shown after every server start in log when update is available
enableUpdateChecker = true
# The minimum release type for the update checker to notify
# Allowed values: release, beta, alpha
updateCheckerMinimumReleaseType = "release"
# Set to false to disable config migration from other mods/plugins to this one
# This does not prevent updating of this config after mod updates
allowConfigMigration = true
# Attempt to parse id-based mentions to names in in-game chat
parseMentionsIngame = true
# Set to true to supress warning of unsafe mod download location
ignoreFileSource = false
# Configuration options for commands
[commands]
# The Role IDs of your Admin Roles
# Now supports multiple roles which can access admin commands
adminRoleIDs = [ "289820306418171904" ]
# Add your custom commands here
# You can also generate some on https://erdbeerbaerlp.de/dcintegration-commands/
# You must op this UUID in the ops.txt or some custom commands won't work!
senderUUID = "8d8982a5-8cf9-4604-8feb-3dd5ee1f83a3"
# Enable help command?
# Disabling also removes response when you entered an invalid command
# Requires server restart
helpCmdEnabled = true
# Enable the list command in discord
# Requires server restart
listCmdEnabled = true
# Enable the uptime command in discord
# Requires server restart
uptimeCmdEnabled = true
# Set to false to completely disable the "Unknown Command" message
showUnknownCommandMessage = true
# Set to true to enable the "Unknown Command" message in all channels
showUnknownCommandEverywhere = false
[[commands.customCommands]]
name = "kick"
description = "Kicks an player from the Server"
mcCommand = "kick %player% %reason%"
adminOnly = true
hidden = false
[[commands.customCommands.args]]
name = "player"
description = "The player to be kicked"
optional = false
[[commands.customCommands.args]]
name = "reason"
description = "Reason for the kick"
optional = true
[[commands.customCommands]]
name = "stop"
description = "Stops the server"
mcCommand = "stop"
adminOnly = true
hidden = false
args = [ ]
[[commands.customCommands]]
name = "kill"
description = "Kills an Player or Entity"
mcCommand = "kill %target%"
adminOnly = true
hidden = false
[[commands.customCommands.args]]
name = "target"
description = "The target(s) for the kill command."
optional = false
# Toggle some message related features
[messages]
# Changing this to an language key (like en-US, de-DE) will always attempt to download the latest language file from https://github.com/ErdbeerbaerLP/Discord-Integration-Translations
# Setting to 'local' disables downloading
language = "local"
# Enable formatting conversion (Markdown <==> Minecraft)
convertCodes = true
# Send formatting codes from mc chat to discord
# Has no effect when markdown <==> Minecraft is enabled
formattingCodesToDiscord = false
# Should /say output be sent to discord?
sendOnSayCommand = true
# Should /me output be sent to discord?
sendOnMeCommand = true
# When an /say command's message starts with this prefix, it will not be sent to discord
sayCommandIgnoredPrefix = "§4§6§k§r"
# Should tamed entity death be visible in discord?
sendDeathMessagesForTamedAnimals = true
# Advanced options
[advanced]
# Custom channel ID for server specific messages (like Join/leave)
# Leave 'default' to use default channel
serverChannelID = "default"
# Custom channel ID for death messages
# Leave 'default' to use default channel
deathsChannelID = "default"
# Custom channel for for ingame messages
# Leave 'default' to use default channel
chatOutputChannelID = "default"
# Custom channel where messages get sent to minecraft
# Leave 'default' to use default channel
chatInputChannelID = "default"
# Allows you to change the target URL for the API to make it usable with custom discord instances like fosscord
# DO NOT CHANGE if you don't know what you are doing!!
baseAPIUrl = "https://discord.com"
# Config options which only have an effect when using forge
[forgeSpecific]
# A list of blacklisted modids
# Adding one will prevent the mod to send messages to discord using forges IMC system
IMC_modIdBlacklist = [ "examplemod" ]
# Show item information, which is visible on hover ingame, as embed in discord?
sendItemInfo = true
# Configuration for linking
[linking]
# Unlink players when they leave the discord server for whatever reason (ex. leave,kick,ban)?
unlinkOnLeave = true
# Should discord linking be enabled?
# If whitelist is on, this can NOT be disabled
# DOES NOT WORK IN OFFLINE MODE!
enableLinking = true
# Role ID of an role an player should get when he links his discord account
# Leave as 0 to disable
linkedRoleID = "0"
# Enable discord based whitelist?
# This will override the link config!
# To whitelist use the whitelist command in the bot DMs
whitelistMode = false
# Adding Role IDs here will require the players to have at least ONE of these roles to link account
requiredRoles = [ "minecraft" ]
settingsBlacklist = [ ]
# Allows you to configure the default values of some personal settings
[linking.personalSettingsDefaults]
default_useDiscordNameInChannel = true
default_ignoreReactions = false
default_pingSound = true
# Webhook configuration
[webhook]
# Whether or not the bot should use a webhook (it will create one)
enable = true
# The avatar to be used for server messages
serverAvatarURL = "https://raw.githubusercontent.com/ErdbeerbaerLP/Discord-Chat-Integration/master/images/srv.png"
# The name to be used for server messages
serverName = "Meliora Summer 2022 Minecraft Server"
# The URL where the player avatar gets fetched from
#
# PLACEHOLDERS:
# %uuid% - Returns the player's UUID with dashes
# %uuid_dashless% - Returns the player's UUID without dashes
# %name% - Returns the player's name
# %randomUUID% - Returns an random UUID which can be used to prevent discord cache
playerAvatarURL = "https://minotar.net/avatar/%uuid%?randomuuid=%randomUUID%"
webhookName = "MC_DISCORD_INTEGRATION"
# Configuration for the in-game command '/discord'
[ingameCommand]
# Enable the /discord command to show an custom message with invite URL?
enabled = true
# The message displayed when typing /discord in the server chat
message = "Join our discord! http://discord.gg/myserver"
# The message shown when hovering the /discord command message
hoverMessage = "Click to open the invite url"
# The url to open when clicking the /discord command text
inviteURL = "https://discord.gg/ngYHjDGU4e"
# The command log channel is an channel where every command execution gets logged
[commandLog]
# Channel ID for the command log channel
# Leave 0 to disable
channelID = "0"
# The format of the log messages
#
# PLACEHOLDERS:
# %sender% - The name of the Command Source
# %cmd% - executed command (e.g. "say Hello World"
# %cmd-no-args% - Command without arguments (e.g. "say"
message = "%sender% executed command `%cmd%`"
# A list of commands that should NOT be logged
ignoredCommands = [ "list", "help", "?" ]
# Configure votifier integration here
# (Spigot only)
[votifier]
# Should votifier messages be sent to discord?
enabled = true
# Custom channel ID for Votifier messages
# Leave 'default' to use default channel
votifierChannelID = "default"
# The message format of the votifier message
#
# PLACEHOLDERS:
# %player% - The player´s name
# %site% - The name of the vote site
# %addr% - (IP) Address of the site
message = ":ballot_box: %player% just voted on %site%"
# Name of the webhook title
name = "Votifier"
# URL of the webhook avatar image
avatarURL = "https://www.cubecraft.net/attachments/bkjvmqn-png.126824/"
# Configure Dynmap integration here
[dynmap]
# The message format of the message forwarded to discord
#
# PLACEHOLDERS:
# %sender% - The sender´s name
# %msg% - The Message
dcMessage = "<%sender%> %msg%"
# Custom channel ID for dynmap chat
# Leave 'default' to use default channel
dynmapChannelID = "default"
# Name of the webhook title
name = "Dynmap Web-Chat"
# URL of the webhook avatar image
avatarURL = "https://static.wikia.nocookie.net/minecraft_gamepedia/images/9/91/Map_Zoom_0.png/revision/latest?cb=20200311153330"
# The name format of the message forwarded to the dynmap webchat
#
# PLACEHOLDERS:
# %name% - The discord name of the sender (including nickname)
# %name#tag% - The discord name with tag of the sender (without nickname)
webName = "%name% (discord)"
# Name shown in discord when no name was specified on the website
unnamed = "Unnamed"
# Configure some plugin-specific BStats settings here
# Everything can be seen here: https://bstats.org/plugin/bukkit/DiscordIntegration/9765
#
# Does not apply to fabric yet, as there is no bstats for it
[bstats]
# Allow sending of installed addon stats (Name and version of installed addons)
sendAddonStats = true
# Settings for servers running as Bungeecord-suberver
[bungee]
# Set this to true if the server is running as an subserver of an bungeecord network and therefore needs to be in offline mode
# Setting this will force account linking in offline mode
# Do NOT use for actual offline mode servers, as this will break the linking feature because of the UUIDs!
#
# Currently no support for floodgate running on bungee
isBehindBungee = false
Crash report / Error log (if applicable)
No response
Additional Information
No response
Not sure if it's the same issue but I can't get 2.4.7 to go online and the ingame /discord doesn't work. Using forge 40.1.73
Not sure if it's the same issue but I can't get 2.4.7 to go online and the ingame /discord doesn't work. Using forge 40.1.73
Downgrade back to 2.4.5. It works flawless. 2.4.7 is broke from the build and not working.
Same issue:
12.08 19:05:20 [Server] Server thread/ERROR Failed to get channel with ID '1007768441949786212', falling back to default channel
12.08 19:05:20 [Server] Thread-15/ERROR Failed to get channel with ID '1007768441949786212', falling back to default channel
12.08 19:05:20 [Server] Thread-15/WARN java.lang.IllegalStateException: Channel does not exist, check channel ID and bot permissions on both channel and category
12.08 19:05:20 [Server] Thread-15/WARN at de.erdbeerbaerlp.dcintegration.common.storage.CommandRegistry.updateSlashCommands(CommandRegistry.java:36)
12.08 19:05:20 [Server] Thread-15/WARN at de.erdbeerbaerlp.dcintegration.common.Discord.lambda$startThreads$9(Discord.java:385)
12.08 19:05:20 [Server] Thread-15/WARN at java.base/java.lang.Thread.run(Thread.java:833)
12.08 19:05:20 [Server] Thread-15/ERROR Failed to register slash commands! Please re-invite the bot to all servers the bot is on using this link: https://discord.com/oauth2/authorizelient_id=xxxxxxxxxxxxxxx&scope=applications.commands%20bot&permissions=2953964624
I have the same issue. Both versions of MC - 1.16 and 1.18
forge-1.16.5-36.2.28
and
forge-1.18.2-40.1.68
Config apart from personalisation (bot token, channelIDs and names) similar to @datenshi888
Had to revert to version 2.4.5 for the bots to work.
What I have noticed - 2.4.7 version does not make the bot online.
[14Aug2022 10:48:26.605] [Server thread/INFO] [STDOUT/]: [de.erdbeerbaerlp.dcintegration.forge.DiscordIntegration:serverStarted:193]: Started
[14Aug2022 10:48:26.607] [Server thread/ERROR] [Discord-Integration-Core/]: Failed to get channel with ID '862763254513532948', falling back to default channel
[14Aug2022 10:48:26.619] [Thread-30/ERROR] [Discord-Integration-Core/]: Failed to get channel with ID '862763196771336212', falling back to default channel
[14Aug2022 10:48:26.623] [Thread-30/INFO] [STDERR/]: [de.erdbeerbaerlp.dcintegration.common.Discord:lambda$startThreads$9:387]: java.lang.IllegalStateException: Channel does not exist, check channel ID and bot permissions on both channel and category
[14Aug2022 10:48:26.628] [Thread-30/INFO] [STDERR/]: [de.erdbeerbaerlp.dcintegration.common.Discord:lambda$startThreads$9:387]: at de.erdbeerbaerlp.dcintegration.common.storage.CommandRegistry.updateSlashCommands(CommandRegistry.java:36)
[14Aug2022 10:48:26.630] [Thread-30/INFO] [STDERR/]: [de.erdbeerbaerlp.dcintegration.common.Discord:lambda$startThreads$9:387]: at de.erdbeerbaerlp.dcintegration.common.Discord.lambda$startThreads$9(Discord.java:385)
[14Aug2022 10:48:26.632] [Thread-30/INFO] [STDERR/]: [de.erdbeerbaerlp.dcintegration.common.Discord:lambda$startThreads$9:387]: at java.lang.Thread.run(Unknown Source)
[14Aug2022 10:48:26.641] [Thread-30/ERROR] [Discord-Integration-Core/]: Failed to register slash commands! Please re-invite the bot to all servers the bot is on using this link: https://discord.com/oauth2/authorize?client_id=xxxxxxxxxxxxxxxxxx&scope=applications.commands%20bot&permissions=2953964624
Bot not even online in Discord.
Same issue on 1.12.2 on forge build 14.23.5.2860. Found this further up in my logs:
[05:58:28] [JDA MainWS-ReadThread/INFO] [STDERR]: [net.dv8tion.jda.internal.utils.SimpleLogger:write:277]: [JDA MainWS-ReadThread] INFO WebSocketClient - Connected to WebSocket
[05:58:28] [JDA MainWS-WriteThread/INFO] [STDERR]: [net.dv8tion.jda.internal.utils.SimpleLogger:write:277]: [JDA MainWS-WriteThread] ERROR WebSocketClient - WebSocket connection was closed and cannot be recovered due to identification issues
CloseCode(4014 / Disallowed intents. Your bot might not be eligible to request a privileged intent such as GUILD_PRESENCES, MESSAGE_CONTENT, or GUILD_MEMBERS.)
[05:58:29] [Server thread/ERROR] [Discord-Integration-Core]: Failed to get channel with ID 'removed', falling back to default channel
Enabled both additional intents for my Discord bot application, bot now connects fine with the precompiled 2.4.7 version of this mod. Not sure which of the additional intents I enabled fixed the issue.
1.19.2 forge 43.1.27
If any it would have been the lowest one as I already had the previous two enabled and was still getting this error.
Enabled the last to see if your fix works and got a crash instead.
[23:07:32] [main/ERROR] [minecraft/Main]: Failed to start the minecraft server
net.minecraftforge.fml.LoadingFailedException: Loading errors encountered: [
Discord Integration (dcintegration) encountered an error during the sided_setup event phase
§7java.lang.NoClassDefFoundError: de/erdbeerbaerlp/dcintegration/common/storage/CommandRegistry
]
at net.minecraftforge.fml.ModLoader.waitForTransition(ModLoader.java:243) ~[fmlcore-1.19.2-43.1.27.jar%23340!/:?] {}
at net.minecraftforge.fml.ModLoader.lambda$dispatchAndHandleError$24(ModLoader.java:208) ~[fmlcore-1.19.2-43.1.27.jar%23340!/:?] {}
at java.util.Optional.ifPresent(Optional.java:178) ~[?:?] {re:mixin,re:computing_frames}
at net.minecraftforge.fml.ModLoader.dispatchAndHandleError(ModLoader.java:208) ~[fmlcore-1.19.2-43.1.27.jar%23340!/:?] {}
at net.minecraftforge.fml.ModLoader.lambda$loadMods$17(ModLoader.java:191) ~[fmlcore-1.19.2-43.1.27.jar%23340!/:?] {}
at java.lang.Iterable.forEach(Iterable.java:75) ~[?:?] {re:mixin}
at net.minecraftforge.fml.ModLoader.loadMods(ModLoader.java:191) ~[fmlcore-1.19.2-43.1.27.jar%23340!/:?] {}
at net.minecraftforge.server.loading.ServerModLoader.load(ServerModLoader.java:33) ~[forge-1.19.2-43.1.27-universal.jar%23344!/:?] {re:classloading}
at net.minecraft.server.Main.main(Main.java:113) ~[server-1.19.2-20220805.130853-srg.jar%23339!/:?] {re:classloading,re:mixin,pl:mixin:A}
at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104) ~[?:?] {}
at java.lang.reflect.Method.invoke(Method.java:577) ~[?:?] {}
at net.minecraftforge.fml.loading.targets.CommonServerLaunchHandler.lambda$launchService$0(CommonServerLaunchHandler.java:29) ~[fmlloader-1.19.2-43.1.27.jar%2367!/:?] {}
at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:30) [modlauncher-10.0.8.jar%2354!/:?] {}
at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) [modlauncher-10.0.8.jar%2354!/:?] {}
at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) [modlauncher-10.0.8.jar%2354!/:?] {}
at cpw.mods.modlauncher.Launcher.run(Launcher.java:106) [modlauncher-10.0.8.jar%2354!/:?] {}
at cpw.mods.modlauncher.Launcher.main(Launcher.java:77) [modlauncher-10.0.8.jar%2354!/:?] {}
at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) [modlauncher-10.0.8.jar%2354!/:?] {}
at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) [modlauncher-10.0.8.jar%2354!/:?] {}
at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:141) [bootstraplauncher-1.1.2.jar:?] {}