Skip to content

Commit a0de3dc

Browse files
Techbot121Meta Construct
authored andcommitted
use username for role if empty
1 parent 70d2cee commit a0de3dc

File tree

1 file changed

+1
-1
lines changed
  • app/services/discord/modules/commands

1 file changed

+1
-1
lines changed

app/services/discord/modules/commands/Role.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ const removeRole = async (ctx: Discord.ChatInputCommandInteraction): Promise<any
208208
};
209209

210210
const setRole = async (ctx: Discord.ChatInputCommandInteraction): Promise<any> => {
211-
const roleName = ctx.options.getString("name") + ROLE_IDENTIFIER;
211+
const roleName = ctx.options.getString("name") ?? ctx.user.displayName + ROLE_IDENTIFIER;
212212
const hex = ctx.options.getString("hex");
213213

214214
const guild = ctx.guild;

0 commit comments

Comments
 (0)