GeyserMC / GeyserDiscordBot

A bot for the GeyserMC Discord server
https://geysermc.org
MIT License
22 stars 42 forks source link

IllegalStateException: This message event did not happen in a guild #311

Closed sentry-io[bot] closed 7 months ago

sentry-io[bot] commented 7 months ago

Sentry Issue: GEYSERDISCORDBOT-80

IllegalStateException: This message event did not happen in a guild
    at net.dv8tion.jda.api.events.message.GenericMessageEvent.getGuild(GenericMessageEvent.java:162)
    at org.geysermc.discordbot.listeners.PreviewHandler.onMessageReceived(PreviewHandler.java:56)
    NewsChannel previewFeedsChannel = ServerSettings.getPreviewFeedsChannel(event.getGuild());
    at net.dv8tion.jda.api.hooks.ListenerAdapter.onEvent(ListenerAdapter.java:446)
    at net.dv8tion.jda.api.hooks.InterfacedEventManager.handle(InterfacedEventManager.java:96)
    at org.geysermc.discordbot.util.SentryEventManager.handle(SentryEventManager.java:45)
    super.handle(event);
...
(16 additional frame(s) were not displayed)

One of the EventListeners had an uncaught exception