本文整理匯總了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;
}
}
示例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));
}
}
示例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;
}
示例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;
}
示例5: removeAll
import net.dv8tion.jda.core.events.message.react.MessageReactionRemoveAllEvent; //導入依賴的package包/類
default int removeAll(MessageReactionRemoveAllEvent event) {
return IGNORED;
}
示例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;
}
示例7: onMessageReactionRemoveAll
import net.dv8tion.jda.core.events.message.react.MessageReactionRemoveAllEvent; //導入依賴的package包/類
public boolean onMessageReactionRemoveAll(MessageReactionRemoveAllEvent event);
示例8: onMessageReactionRemoveAll
import net.dv8tion.jda.core.events.message.react.MessageReactionRemoveAllEvent; //導入依賴的package包/類
public void onMessageReactionRemoveAll(MessageReactionRemoveAllEvent event) {}