Add user id to user-related messages

This commit is contained in:
Tarrgon
2025-11-18 11:49:09 -05:00
parent f86bda1ff3
commit ed6cd90627
4 changed files with 6 additions and 6 deletions
+3 -3
View File
@@ -128,7 +128,7 @@ export default {
await Database.putNote(user.id, reason, interaction.user.id); await Database.putNote(user.id, reason, interaction.user.id);
interaction.editReply(`Note added to <@${user.id}>.\n\nReason:\n${reason}`); interaction.editReply(`Note added to <@${user.id}> (${user.id}).\n\nReason:\n${reason}`);
} else if (subcommand == 'remove') { } else if (subcommand == 'remove') {
const noteId = interaction.options.getInteger('note', true); const noteId = interaction.options.getInteger('note', true);
@@ -203,11 +203,11 @@ export default {
await Database.editNote(noteId, note.reason, reason, interaction.user.id); await Database.editNote(noteId, note.reason, reason, interaction.user.id);
interaction.editReply(`Note on <@${user.id}> edited.\n\nNew reason:\n${reason}`); interaction.editReply(`Note on <@${user.id}> (${user.id}) edited.\n\nNew reason:\n${reason}`);
} else if (subcommand == 'list') { } else if (subcommand == 'list') {
const noteMessage = await getNoteMessage(user.id, 1); const noteMessage = await getNoteMessage(user.id, 1);
if (!noteMessage) return interaction.editReply(`No notes found for <@${user.id}>`); if (!noteMessage) return interaction.editReply(`No notes found for <@${user.id}> (${user.id})`);
interaction.editReply(noteMessage); interaction.editReply(noteMessage);
} }
+1 -1
View File
@@ -9,7 +9,7 @@ export async function handleMemberJoin(member: GuildMember) {
const channel = await member.guild.channels.fetch(guildSettings.new_member_channel_id) as GuildTextBasedChannel; const channel = await member.guild.channels.fetch(guildSettings.new_member_channel_id) as GuildTextBasedChannel;
if (channel) { if (channel) {
const content = `${member.toString()}'s e621 and discord account(s):\n${await getE621Alts(member.id, member.guild)}`; const content = `${member.toString()}'s (${member.id}) e621 and discord account(s):\n${await getE621Alts(member.id, member.guild)}`;
channel.send(content).catch(console.error); channel.send(content).catch(console.error);
+1 -1
View File
@@ -46,7 +46,7 @@ export async function getDiscordAlts(e621Id: number, guild: Guild, depth = 1, ig
banned = !!(await guild.bans.fetch(discordId)); banned = !!(await guild.bans.fetch(discordId));
} catch (e) { } } catch (e) { }
content += `${' '.repeat((depth - 1) * 2)}- <@${discordId}>${banned ? ' [BANNED]' : ''}\n${alts}`; content += `${' '.repeat((depth - 1) * 2)}- <@${discordId}> (${discordId})${banned ? ' [BANNED]' : ''}\n${alts}`;
} }
return content; return content;
+1 -1
View File
@@ -14,5 +14,5 @@ export async function handleWhoIsInteraction(interaction: CommandInteraction, va
const content = await getE621Alts(user.id, interaction.guild!); const content = await getE621Alts(user.id, interaction.guild!);
interaction.editReply(`<@${user.id}>'s e621 and discord account(s):\n${content}`); interaction.editReply(`<@${user.id}>'s (${user.id}) e621 and discord account(s):\n${content}`);
} }