Skip to content

Commit

Permalink
minor cleanups, and simplify readme to just link the guide
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Oct 17, 2021
1 parent 6d569b9 commit 1eeed01
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 18 deletions.
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<Boolean> requireClientID = () -> {
if (!DenizenDiscordBot.instance.connections.containsKey(id.asString())) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 1eeed01

Please sign in to comment.