|
47 | 47 | public class JMusicBot |
48 | 48 | { |
49 | 49 | public final static Logger LOG = LoggerFactory.getLogger(JMusicBot.class); |
50 | | - public final static Permission[] RECOMMENDED_PERMS = {Permission.MESSAGE_READ, Permission.MESSAGE_WRITE, Permission.MESSAGE_HISTORY, Permission.MESSAGE_ADD_REACTION, |
| 50 | + public final static Permission[] RECOMMENDED_PERMS = {Permission.VIEW_CHANNEL, Permission.MESSAGE_SEND, Permission.MESSAGE_HISTORY, Permission.MESSAGE_ADD_REACTION, |
51 | 51 | Permission.MESSAGE_EMBED_LINKS, Permission.MESSAGE_ATTACH_FILES, Permission.MESSAGE_MANAGE, Permission.MESSAGE_EXT_EMOJI, |
52 | 52 | Permission.VOICE_CONNECT, Permission.VOICE_SPEAK, Permission.NICKNAME_CHANGE}; |
53 | | - public final static GatewayIntent[] INTENTS = {GatewayIntent.DIRECT_MESSAGES, GatewayIntent.GUILD_MESSAGES, GatewayIntent.GUILD_MESSAGE_REACTIONS, GatewayIntent.GUILD_VOICE_STATES}; |
| 53 | + public final static GatewayIntent[] INTENTS = {GatewayIntent.MESSAGE_CONTENT, GatewayIntent.DIRECT_MESSAGES, GatewayIntent.GUILD_MESSAGES, GatewayIntent.GUILD_MESSAGE_REACTIONS, GatewayIntent.GUILD_VOICE_STATES}; |
54 | 54 |
|
55 | 55 | /** |
56 | 56 | * @param args the command line arguments |
@@ -118,7 +118,7 @@ private static void startBot() |
118 | 118 | { |
119 | 119 | JDA jda = JDABuilder.create(config.getToken(), Arrays.asList(INTENTS)) |
120 | 120 | .enableCache(CacheFlag.MEMBER_OVERRIDES, CacheFlag.VOICE_STATE) |
121 | | - .disableCache(CacheFlag.ACTIVITY, CacheFlag.CLIENT_STATUS, CacheFlag.EMOTE, CacheFlag.ONLINE_STATUS) |
| 121 | + .disableCache(CacheFlag.ACTIVITY, CacheFlag.CLIENT_STATUS, CacheFlag.EMOJI, CacheFlag.ONLINE_STATUS, CacheFlag.STICKER, CacheFlag.SCHEDULED_EVENTS) |
122 | 122 | .setActivity(config.isGameNone() ? null : Activity.playing("loading...")) |
123 | 123 | .setStatus(config.getStatus()==OnlineStatus.INVISIBLE || config.getStatus()==OnlineStatus.OFFLINE |
124 | 124 | ? OnlineStatus.INVISIBLE : OnlineStatus.DO_NOT_DISTURB) |
@@ -147,13 +147,13 @@ private static void startBot() |
147 | 147 | + "on https://discord.com/developers/applications/" + jda.getSelfUser().getId() + "/bot"); |
148 | 148 | } |
149 | 149 | } |
150 | | - catch (LoginException ex) |
151 | | - { |
152 | | - prompt.alert(Prompt.Level.ERROR, "JMusicBot", ex + "\nPlease make sure you are " |
153 | | - + "editing the correct config.txt file, and that you have used the " |
154 | | - + "correct token (not the 'secret'!)\nConfig Location: " + config.getConfigLocation()); |
155 | | - System.exit(1); |
156 | | - } |
| 150 | +// catch (LoginException ex) |
| 151 | +// { |
| 152 | +// prompt.alert(Prompt.Level.ERROR, "JMusicBot", ex + "\nPlease make sure you are " |
| 153 | +// + "editing the correct config.txt file, and that you have used the " |
| 154 | +// + "correct token (not the 'secret'!)\nConfig Location: " + config.getConfigLocation()); |
| 155 | +// System.exit(1); |
| 156 | +// } |
157 | 157 | catch(IllegalArgumentException ex) |
158 | 158 | { |
159 | 159 | prompt.alert(Prompt.Level.ERROR, "JMusicBot", "Some aspect of the configuration is " |
|
0 commit comments