discord-jda / JDA

Java wrapper for the popular chat & VOIP service: Discord https://discord.com
Apache License 2.0
4.34k stars 735 forks source link

New Application API Example #42

Closed xunkar closed 8 years ago

xunkar commented 8 years ago

Hello, I've been using your library for my own project, but with the new Applications migration I'm left wondering how to authenticate my bot now since there is no password. Could you provide a complete example of how to initialize a bot under this new system? Thank you.

din0s commented 8 years ago

You can use JDABuilder(botToken) or JDABuilder#setBotToken.

freyacodes commented 8 years ago

Here's how my bot handles it: https://github.com/Frederikam/FredBoat/blob/master/src/main/java/fredboat/FredBoat.java#L89

kantenkugel commented 8 years ago

^ You guys are fast!

metagn commented 8 years ago

wtf i was just going to respond with no comments then i switch from a tab and boom

DV8FromTheWorld commented 8 years ago

@xunkar @DinosParkour the JDABuilder(botToken) constructor is going away with JDA v2.0. Please use JDABuilder() and setBotToken(token)

xunkar commented 8 years ago

Thanks a lot for the quick answer everyone!

metagn commented 8 years ago

btw, https://discord.gg/0SBTUU1wZTY3Epi1