diff --git a/README.md b/README.md index 15e1d79..634a382 100644 --- a/README.md +++ b/README.md @@ -3,11 +3,7 @@ dDiscordBot: Adds a Discord Bot to Denizen! **Download (Dev builds)**: https://ci.citizensnpcs.co/job/dDiscordBot/ -Only works if you know how to operate a Discord bot, of course! Refer to any public guide, such as [this one](https://github.com/reactiflux/discord-irc/wiki/Creating-a-discord-bot-&-getting-a-token) or [this one](https://discordpy.readthedocs.io/en/stable/discord.html). - -It's strongly recommended you enable the `Server Members Intent` in the Discord bot settings. Bot functionality is limited if you don't. - -View guide page here: https://guide.denizenscript.com/guides/expanding/ddiscordbot.html +For information on how to use, view the guide page here: https://guide.denizenscript.com/guides/expanding/ddiscordbot.html #### Need help using dDiscordBot? Try one of these places: diff --git a/src/main/java/com/denizenscript/ddiscordbot/commands/DiscordCommand.java b/src/main/java/com/denizenscript/ddiscordbot/commands/DiscordCommand.java index f7bc15f..319924a 100644 --- a/src/main/java/com/denizenscript/ddiscordbot/commands/DiscordCommand.java +++ b/src/main/java/com/denizenscript/ddiscordbot/commands/DiscordCommand.java @@ -199,18 +199,7 @@ public void execute(ScriptEntry scriptEntry) { ElementTag url = scriptEntry.getElement("url"); ElementTag messageId = scriptEntry.getElement("message_id"); if (scriptEntry.dbCallShouldDebug()) { - Debug.report(scriptEntry, getName(), id.debug() - + (channel != null ? channel.debug() : "") - + instruction.debug() - + (message != null ? message.debug() : "") - + (user != null ? user.debug() : "") - + (guild != null ? guild.debug() : "") - + (role != null ? role.debug() : "") - + (status != null ? status.debug() : "") - + (activity != null ? activity.debug() : "") - + (url != null ? url.debug() : "") - + (tokenFile != null ? tokenFile.debug() : "") - + (messageId != null ? messageId.debug() : "")); + Debug.report(scriptEntry, getName(), id, channel, instruction, message, user, guild, role, status, activity, url, tokenFile, messageId); } Supplier requireClientID = () -> { if (!DenizenDiscordBot.instance.connections.containsKey(id.asString())) { diff --git a/src/main/java/com/denizenscript/ddiscordbot/commands/DiscordCommandCommand.java b/src/main/java/com/denizenscript/ddiscordbot/commands/DiscordCommandCommand.java index fe2c28e..4bec69b 100644 --- a/src/main/java/com/denizenscript/ddiscordbot/commands/DiscordCommandCommand.java +++ b/src/main/java/com/denizenscript/ddiscordbot/commands/DiscordCommandCommand.java @@ -64,7 +64,7 @@ public DiscordCommandCommand() { // // You can use the "enabled" argument to set whether the command should be enabled for everyone by default. // To edit the permissions of a command (who can use it, and who can't), use the "perms" instruction. Permissions MUST be edited AFTER creation. - // Use the "enable_for" and "disable_for" arguments (ListTags of DiscordUserTags or DiscordRoleTags) when editing permissions. + // Use the "enable_for" and "disable_for" arguments (ListTags of DiscordUserTags or DiscordRoleTags - note: actual objects not raw IDs) when editing permissions. // // You DO NOT need to create a command on startup every time! Once a command is created, it will persist until you delete it. // Using the "create" instruction on an existing command will update it. @@ -225,6 +225,9 @@ public void execute(ScriptEntry scriptEntry) { scriptEntry.setFinished(true); return; } + if (group != null && group.bot == null) { + group.bot = id.asString(); + } JDA client = DenizenDiscordBot.instance.connections.get(id.asString()).client; Bukkit.getScheduler().runTaskAsynchronously(DenizenDiscordBot.instance, () -> { try {