use of com.chill.projects.bot.embeds.EmbedCreator in project Frost by woojiahao.
the class AutomaticCommands method onGuildMemberJoin.
@Override
public void onGuildMemberJoin(GuildMemberJoinEvent event) {
MessageEmbed embed = new EmbedCreator().createWelcomeEmbed(FrostEmbedType.WELCOME, new DiscordSet(event.getUser(), event.getGuild()));
event.getGuild().getTextChannelById(FrostGuildList.getFrostGuildByID(event.getGuild().getId()).getGeneralChannel()).sendMessage(embed).queue();
FrostRoles.assignRole(new DiscordSet(event.getUser(), event.getGuild()), RolesID.MEMBER);
if (event.getUser().isBot()) {
FrostRoles.assignRole(new DiscordSet(event.getUser(), event.getGuild()), RolesID.SLAVE);
}
}
Aggregations