当前位置: 首页>>代码示例>>Java>>正文


Java ReconnectSuccessEvent类代码示例

本文整理汇总了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);
	}
}
 
开发者ID:Shadorc,项目名称:Shadbot,代码行数:13,代码来源:ShardListener.java

示例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());
    }
}
 
开发者ID:ripxfrostbite,项目名称:karren-sama,代码行数:11,代码来源:ReconnectListener.java

示例3: ReconnectEvent

import sx.blah.discord.handle.impl.events.shard.ReconnectSuccessEvent; //导入依赖的package包/类
public ReconnectEvent(ReconnectSuccessEvent event) {
    super(event);
}
 
开发者ID:quanticc,项目名称:sentry,代码行数:4,代码来源:ReconnectEvent.java

示例4: getSource

import sx.blah.discord.handle.impl.events.shard.ReconnectSuccessEvent; //导入依赖的package包/类
@Override
public ReconnectSuccessEvent getSource() {
    return (ReconnectSuccessEvent) source;
}
 
开发者ID:quanticc,项目名称:sentry,代码行数:5,代码来源:ReconnectEvent.java

示例5: onReconnectSuccess

import sx.blah.discord.handle.impl.events.shard.ReconnectSuccessEvent; //导入依赖的package包/类
@EventSubscriber
public void onReconnectSuccess(ReconnectSuccessEvent event) {
    publisher.publishEvent(new ReconnectEvent(event));
}
 
开发者ID:quanticc,项目名称:sentry,代码行数:5,代码来源:Supervisor.java

示例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]);
}
 
开发者ID:Shadorc,项目名称:Shadbot,代码行数:4,代码来源:ShardListener.java


注:本文中的sx.blah.discord.handle.impl.events.shard.ReconnectSuccessEvent类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。