Eufranio / MagiBridge

A Discord <-> Minecraft chat relay plugin
MIT License
47 stars 27 forks source link

[net.dv8tion.jda.internal.requests.RateLimiter] trying to send an embed message #245

Closed Andrei0016 closed 2 years ago

Andrei0016 commented 2 years ago

I'm working on a discord bot integrated in a minecraft plugin and when I try to close the server the bot should send a embed message with the server log but it just give me the error net.dv8tion.jda.internal.requests.RateLimiter How can I fix this? Code: `
@Override public void onDisable() {

    ebMessage.setTitle("Server Log", null);
    ebMessage.setColor(Color.CYAN);
    TextChannel textChannel = this.bot.getTextChannelById("991332686641766472");

    for (String message : messageList) {
        ebMessage.addField("-------------------------------------------------------", message, false);
    }

    textChannel.sendMessageEmbeds(ebMessage.build()).queue();

    if (this.bot != null) {
        this.bot.shutdown();
    }
}

} `