Sanel Trnka
Sanel Trnka

Reputation: 23

Discord JDA add custom Emotes on GuildJoin

I have a .png image which I want to use as a emote. Is there a way to add this image to the server as an emote? I think this should be done in the GuildJoinEvent.

Thanks for your answers!

Upvotes: 0

Views: 199

Answers (1)

Hannes Braun
Hannes Braun

Reputation: 162

If I understand you correctly, you'd like to add a custom emote as soon as your bot joins a server. To achieve that, you could do something like the following in the GuildJoinEvent:

Icon icon = Icon.from(new File("image.png"));
event.getGuild().createEmote("MyEmoteName", icon).queue();

Upvotes: 1

Related Questions