本文整理汇总了Java中sx.blah.discord.handle.impl.events.shard.ReconnectSuccessEvent类的典型用法代码示例。如果您正苦于以下问题:Java ReconnectSuccessEvent类的具体用法?Java ReconnectSuccessEvent怎么用?Java ReconnectSuccessEvent使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ReconnectSuccessEvent类属于sx.blah.discord.handle.impl.events.shard包,在下文中一共展示了ReconnectSuccessEvent类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onShardEvent
import sx.blah.discord.handle.impl.events.shard.ReconnectSuccessEvent; //导入依赖的package包/类
@EventSubscriber
public void onShardEvent(ShardEvent event) {
if(event instanceof DisconnectedEvent) {
this.onDisconnectedEvent((DisconnectedEvent) event);
} else if(event instanceof ShardReadyEvent) {
this.onShardReadyEvent((ShardReadyEvent) event);
} else if(event instanceof ReconnectSuccessEvent) {
this.onReconnectSuccessEvent((ReconnectSuccessEvent) event);
} else if(event instanceof ResumedEvent) {
this.onResumedEvent((ResumedEvent) event);
}
}
示例2: handle
import sx.blah.discord.handle.impl.events.shard.ReconnectSuccessEvent; //导入依赖的package包/类
@Override
public void handle(ReconnectSuccessEvent reconnectSuccessEvent) {
Karren.bot.getAr().setSuspend(false);
try {
reconnectSuccessEvent.getClient().changePresence(StatusType.ONLINE, ActivityType.PLAYING, "KarrenSama Ver." + Karren.botVersion);
} catch (DiscordException e) {
Karren.log.error(e.getErrorMessage());
}
}
示例3: ReconnectEvent
import sx.blah.discord.handle.impl.events.shard.ReconnectSuccessEvent; //导入依赖的package包/类
public ReconnectEvent(ReconnectSuccessEvent event) {
super(event);
}
示例4: getSource
import sx.blah.discord.handle.impl.events.shard.ReconnectSuccessEvent; //导入依赖的package包/类
@Override
public ReconnectSuccessEvent getSource() {
return (ReconnectSuccessEvent) source;
}
示例5: onReconnectSuccess
import sx.blah.discord.handle.impl.events.shard.ReconnectSuccessEvent; //导入依赖的package包/类
@EventSubscriber
public void onReconnectSuccess(ReconnectSuccessEvent event) {
publisher.publishEvent(new ReconnectEvent(event));
}
示例6: onReconnectSuccessEvent
import sx.blah.discord.handle.impl.events.shard.ReconnectSuccessEvent; //导入依赖的package包/类
private void onReconnectSuccessEvent(ReconnectSuccessEvent event) {
LogUtils.infof("Shard %d reconnected.", event.getShard().getInfo()[0]);
}