use of net.dv8tion.jda.api.events.thread.ThreadRevealedEvent in project JDA by DV8FromTheWorld.
the class ThreadListSyncHandler method handleInternally.
@Override
protected Long handleInternally(DataObject content) {
long guildId = content.getLong("guild_id");
if (api.getGuildSetupController().isLocked(guildId))
return guildId;
EntityBuilder entityBuilder = api.getEntityBuilder();
DataArray threadsArrayJson = content.getArray("threads");
for (int i = 0; i < threadsArrayJson.length(); i++) {
DataObject threadJson = threadsArrayJson.getObject(i);
ThreadChannel thread = entityBuilder.createThreadChannel(threadJson, guildId);
api.handleEvent(new ThreadRevealedEvent(api, responseNumber, thread));
}
return null;
}
Aggregations