aboutsummaryrefslogtreecommitdiff
path: root/src/commands
diff options
context:
space:
mode:
authorCara Salter <cara@devcara.com>2022-01-12 15:49:26 -0500
committerCara Salter <cara@devcara.com>2022-01-12 15:49:26 -0500
commit5d9e3781b4030d9896e5bde86ab18da3a3d8ee60 (patch)
tree38eb4b61878e50de4fcd7e64b801727d10dcca88 /src/commands
parent67e4081aa69f489ad88ee064402d68a5969069c2 (diff)
downloadglitch-ng-5d9e3781b4030d9896e5bde86ab18da3a3d8ee60.tar.gz
glitch-ng-5d9e3781b4030d9896e5bde86ab18da3a3d8ee60.zip
rroles: Fix styling
Make the role list have mentions instead of just the role names. Also make the event handler ignore itself.
Diffstat (limited to 'src/commands')
-rw-r--r--src/commands/reactionroles.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/commands/reactionroles.rs b/src/commands/reactionroles.rs
index 53aa794..eb5f098 100644
--- a/src/commands/reactionroles.rs
+++ b/src/commands/reactionroles.rs
@@ -106,7 +106,7 @@ pub async fn init(ctx: Context<'_>,
if let Some(role) = ctx.guild().unwrap().role_by_name(role_name) {
sqlx::query!("INSERT INTO reaction_roles (channel_id, message_id, guild_id, reaction, role_id) VALUES ($1, $2, $3, $4, $5)", rolemenu_msg.channel_id.0.to_string(), rolemenu_msg.id.0.to_string(), ctx.guild_id().unwrap().0.to_string(), reaction.to_string(), role.id.0.to_string()).execute(&pool).await?;
rolemenu_msg.react(ctx.discord(), reaction.clone()).await?;
- rolelist_formatted.push_str(&format!("{} - {}\n", get_reactiontype_display(&reaction), role.name.clone()));
+ rolelist_formatted.push_str(&format!("{} - <@&{}>\n", get_reactiontype_display(&reaction), role.id.0.clone()));
} else {
ctx.say(format!("Invalid role provided: {}", role_name)).await?;
return Ok(());