diff --git a/.version b/.version index 05b19b1..fa3de58 100644 --- a/.version +++ b/.version @@ -1 +1 @@ -0.0.4 \ No newline at end of file +0.0.5 \ No newline at end of file diff --git a/README.md b/README.md index b1a8b09..b37476e 100644 --- a/README.md +++ b/README.md @@ -80,10 +80,10 @@ Initiate the message creation process with `rl!new`. User: rl!new ``` -Next, you will be asked to provide the ID of the channel you want to send the message in. You can find the ID by right clicking the channel and clicking on `Copy ID`. If you do not see a `Copy ID` option, go to `Discord Settings > Appearance` and, at the bottom of the page, turn `Developer Mode` ON. +Next, you will be asked to mention the channel you want to send the message in. ``` -Bot: Please paste the channel ID where to send the auto-role message. -User: 595907369242722304 +Bot: Please mention the #channel where to send the auto-role message. +User: #get-roles ``` Next, you will be asked to attach emojis to roles. Only use standard emojis or those that are hosted on your server (i.e. the Bot is not a Nitro user and cannot use emojis from other servers). Send a single message for each single combination and then type `done` when you have finished attaching emojis to their respective roles. Ensure that the roles are mentionable when you are doing this step. You can disable mentions after finishing this step. @@ -107,9 +107,11 @@ User: Select your roles // Click on the buttons below to give yourself some role Finally, the bot will send the message to the channel specified in the first step, and it will react with each reactions specified so that the buttons are ready to be used. The bot will remove any new reactions to the message to avoid clutter. For example, if you added an `:eggplant:` reaction to the message created in this example, the bot will remove it as it is not attached to any role. #### Editing -To edit an old embed and preserve the emoji-role links, you can use the `edit` command. You will need the channel and message id where the embed is located. You can find these IDs by right clicking the respective channel and messages (with developer mode on in your Discord settings). For example: +To edit an old embed and preserve the emoji-role links, you can use the `edit` command. You will need the message id where the embed is located. You can find these IDs by right clicking the respective channel and messages. You can find the ID by right clicking the channel and clicking on `Copy ID`. If you do not see a `Copy ID` option, go to `Discord Settings > Appearance` and, at the bottom of the page, turn `Developer Mode` ON. + +For example: ``` -rl!edit CHANNEL_ID // MESSAGE_ID // New Title // New Description +rl!edit #channelname // MESSAGE_ID // New Title // New Description ``` Any admin can edit old embeds, even if they were originally created by another admin. diff --git a/bot.py b/bot.py index 0b2044b..a68502c 100644 --- a/bot.py +++ b/bot.py @@ -11,7 +11,7 @@ # Original Repository: https://github.com/eibex/reaction-light __author__ = "eibex" -__version__ = "0.0.4" +__version__ = "0.0.5" __license__ = "MIT" directory = path.dirname(path.realpath(__file__)) @@ -109,7 +109,7 @@ async def on_message(message): msg = message.content.split() if step is not None: # Checks if the setup process was started before. if step == 1: # If it was not, it ignores the message. - rlightfm.step1(r_id, msg[0]) + rlightfm.step1(r_id, message.channel_mentions[0].id) await message.channel.send( "Attach roles and emojis separated by a space (one combination per message). When you are done type `done`. Example:\n:smile: `@Role`" ) @@ -197,7 +197,7 @@ async def new(ctx): if isadmin(ctx): rlightfm.listen(ctx.message.author.id, ctx.message.channel.id) await ctx.send( - "Please paste the channel ID where to " "send the auto-role message." + "Please mention the #channel where to send the auto-role message." ) else: await ctx.send("You do not have an admin role.") @@ -219,10 +219,10 @@ async def edit_embed(ctx): msg = ctx.message.content.split(" // ") if len(msg) < 4: await ctx.send( - "Formatting is: `Channel ID // Message ID // New Title // New Content`" + "Formatting is: `#channelname // Message ID // New Title // New Content`" ) return - ch_id = int(sub("[^0-9]", "", msg[0])) + ch_id = ctx.message.channel_mentions[0].id old_id = int(msg[1]) try: ch = bot.get_channel(ch_id) diff --git a/setup.py b/setup.py index 9d491a2..f13e5fc 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ # Original Repository: https://github.com/eibex/reaction-light print("Author: eibex") -print("Version: 0.0.4") +print("Version: 0.0.5") print("License: MIT\n") print("### ### Reaction Light Setup ### ###")