當前位置: 首頁>>代碼示例>>Java>>正文


Java MessageReactionRemoveAllEvent類代碼示例

本文整理匯總了Java中net.dv8tion.jda.core.events.message.react.MessageReactionRemoveAllEvent的典型用法代碼示例。如果您正苦於以下問題:Java MessageReactionRemoveAllEvent類的具體用法?Java MessageReactionRemoveAllEvent怎麽用?Java MessageReactionRemoveAllEvent使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


MessageReactionRemoveAllEvent類屬於net.dv8tion.jda.core.events.message.react包,在下文中一共展示了MessageReactionRemoveAllEvent類的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: fired

import net.dv8tion.jda.core.events.message.react.MessageReactionRemoveAllEvent; //導入依賴的package包/類
@Override
public default Object fired(Object... data) {
    final MessageType messageType = (MessageType) data[1];
    switch (messageType) {
        case RECEIVED:
            return onMessageReceived((MessageEvent) data[0]);
        case UPDATED:
            return onMessageUpdate((MessageUpdateEvent) data[0]);
        case DELETED:
            return onMessageDelete((MessageDeleteEvent) data[0]);
        case BULK_DELETED:
            return onMessageBulkDelete((MessageBulkDeleteEvent) data[0]);
        case EMBEDED:
            return onMessageEmbed((MessageEmbedEvent) data[0]);
        case REACTION_ADDED:
            return onMessageReactionAdd((MessageReactionAddEvent) data[0]);
        case REACTION_REMOVED:
            return onMessageReactionRemove((MessageReactionRemoveEvent) data[0]);
        case REACTION_REMOVED_ALL:
            return onMessageReactionRemoveAll((MessageReactionRemoveAllEvent) data[0]);
        default:
            return false;
    }
}
 
開發者ID:Panzer1119,項目名稱:Supreme-Bot,代碼行數:25,代碼來源:MessageListener.java

示例2: onMessageReactionRemoveAll

import net.dv8tion.jda.core.events.message.react.MessageReactionRemoveAllEvent; //導入依賴的package包/類
@Override
public final void onMessageReactionRemoveAll(MessageReactionRemoveAllEvent event) {
    final Object[] output = ListenerManager.fireListeners(MessageListener.class, CommandHandler.ADMIN_PREDICATE, new Object[]{event, MessageType.REACTION_REMOVED_ALL});
    if (DEBUG && output.length > 0) {
        System.out.println(String.format("%d plugin%s used this message event: %s", output.length, (output.length == 1 ? "" : "s"), event));
    }
}
 
開發者ID:Panzer1119,項目名稱:Supreme-Bot,代碼行數:8,代碼來源:MessageHandler.java

示例3: removeAll

import net.dv8tion.jda.core.events.message.react.MessageReactionRemoveAllEvent; //導入依賴的package包/類
@Override
public synchronized int removeAll(MessageReactionRemoveAllEvent event) {
    starboardMessage.delete().queue();
    SessionStats.starboardMessageRemoved();
    GabrielData.starboards().remove(starboardMessage.getGuild().getIdLong(), originalMessageID);
    return COMPLETED;
}
 
開發者ID:natanbc,項目名稱:GabrielBot,代碼行數:8,代碼來源:StarboardListener.java

示例4: handleInternally

import net.dv8tion.jda.core.events.message.react.MessageReactionRemoveAllEvent; //導入依賴的package包/類
@Override
protected Long handleInternally(JSONObject content)
{
    final long messageId = content.getLong("message_id");
    final long channelId = content.getLong("channel_id");
    MessageChannel channel = api.getTextChannelById(channelId);
    if (channel == null)
    {
        api.getEventCache().cache(EventCache.Type.CHANNEL, channelId, () -> handle(responseNumber, allContent));
        EventCache.LOG.debug("Received a reaction for a channel that JDA does not currently have cached channel_id: {} message_id: {}", channelId, messageId);
        return null;
    }
    IEventManager manager = api.getEventManager();

    switch (channel.getType())
    {
        case TEXT:
           manager.handle(
               new GuildMessageReactionRemoveAllEvent(
                       api, responseNumber,
                       messageId, (TextChannel) channel));
           break;
        case GROUP:
            manager.handle(
                new GroupMessageReactionRemoveAllEvent(
                        api, responseNumber,
                        messageId, (Group) channel));
    }

    manager.handle(
        new MessageReactionRemoveAllEvent(
                api, responseNumber,
                messageId, channel));
    return null;
}
 
開發者ID:DV8FromTheWorld,項目名稱:JDA,代碼行數:36,代碼來源:MessageReactionBulkRemoveHandler.java

示例5: removeAll

import net.dv8tion.jda.core.events.message.react.MessageReactionRemoveAllEvent; //導入依賴的package包/類
default int removeAll(MessageReactionRemoveAllEvent event) {
    return IGNORED;
}
 
開發者ID:natanbc,項目名稱:GabrielBot,代碼行數:4,代碼來源:ReactionOperation.java

示例6: removeAll

import net.dv8tion.jda.core.events.message.react.MessageReactionRemoveAllEvent; //導入依賴的package包/類
@Override
public int removeAll(MessageReactionRemoveAllEvent event) {
    shitboardMessage.delete().queue();
    GabrielData.shitboards().remove(shitboardMessage.getGuild().getIdLong(), originalMessageID);
    return COMPLETED;
}
 
開發者ID:natanbc,項目名稱:GabrielBot,代碼行數:7,代碼來源:ShitboardListener.java

示例7: onMessageReactionRemoveAll

import net.dv8tion.jda.core.events.message.react.MessageReactionRemoveAllEvent; //導入依賴的package包/類
public boolean onMessageReactionRemoveAll(MessageReactionRemoveAllEvent event); 
開發者ID:Panzer1119,項目名稱:Supreme-Bot,代碼行數:2,代碼來源:MessageListener.java

示例8: onMessageReactionRemoveAll

import net.dv8tion.jda.core.events.message.react.MessageReactionRemoveAllEvent; //導入依賴的package包/類
public void onMessageReactionRemoveAll(MessageReactionRemoveAllEvent event) {} 
開發者ID:DV8FromTheWorld,項目名稱:JDA,代碼行數:2,代碼來源:ListenerAdapter.java


注:本文中的net.dv8tion.jda.core.events.message.react.MessageReactionRemoveAllEvent類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。