3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-10 12:25:02 +00:00
This commit is contained in:
almeidx 2021-07-29 00:37:19 +01:00
parent 3d29963b87
commit 74a676913e
No known key found for this signature in database
GPG key ID: 8558FBFF849BD664
38 changed files with 59 additions and 93 deletions

View file

@ -73,11 +73,7 @@ export const AddCaseCmd = modActionsCmd({
});
if (user) {
sendSuccessMessage(
pluginData,
msg.channel,
`Case #${theCase.case_number} created for **${user.username}#${user.discriminator}**`,
);
sendSuccessMessage(pluginData, msg.channel, `Case #${theCase.case_number} created for **${user.tag}**`);
} else {
sendSuccessMessage(pluginData, msg.channel, `Case #${theCase.case_number} created`);
}

View file

@ -196,7 +196,7 @@ export const BanCmd = modActionsCmd({
// Confirm the action to the moderator
let response = "";
if (!forceban) {
response = `Banned **${user.username}#${user.discriminator}** ${forTime}(Case #${banResult.case.case_number})`;
response = `Banned **${user.tag}** ${forTime}(Case #${banResult.case.case_number})`;
if (banResult.notifyResult.text) response += ` (${banResult.notifyResult.text})`;
} else {
response = `Member forcebanned ${forTime}(Case #${banResult.case.case_number})`;

View file

@ -29,7 +29,7 @@ export const CasesModCmd = modActionsCmd({
async run({ pluginData, message: msg, args }) {
const modId = args.mod || msg.author.id;
const mod = await resolveUser(pluginData.client, modId);
const modName = mod instanceof User ? `${mod.username}#${mod.discriminator}` : modId;
const modName = mod instanceof User ? `${mod.tag}` : modId;
const casesPlugin = pluginData.getPlugin(CasesPlugin);
const totalCases = await casesPlugin.getTotalCasesByMod(modId);

View file

@ -61,10 +61,7 @@ export const CasesUserCmd = modActionsCmd({
const normalCases = cases.filter(c => !c.is_hidden);
const hiddenCases = cases.filter(c => c.is_hidden);
const userName =
user instanceof UnknownUser && cases.length
? cases[cases.length - 1].user_name
: `${user.username}#${user.discriminator}`;
const userName = user instanceof UnknownUser && cases.length ? cases[cases.length - 1].user_name : `${user.tag}`;
if (cases.length === 0) {
msg.channel.send(`No cases found for **${userName}**`);

View file

@ -68,7 +68,7 @@ export const DeleteCaseCmd = modActionsCmd({
}
}
const deletedByName = `${message.author.username}#${message.author.discriminator}`;
const deletedByName = `${message.author.tag}`;
const timeAndDate = pluginData.getPlugin(TimeAndDatePlugin);
const deletedAt = timeAndDate.inGuildTz().format(timeAndDate.getDateFormat("pretty_datetime"));

View file

@ -30,7 +30,7 @@ export const NoteCmd = modActionsCmd({
return;
}
const userName = `${user.username}#${user.discriminator}`;
const userName = `${user.tag}`;
const reason = formatReasonWithAttachments(args.note, msg.attachments.array());
const casesPlugin = pluginData.getPlugin(CasesPlugin);

View file

@ -107,7 +107,7 @@ export const WarnCmd = modActionsCmd({
sendSuccessMessage(
pluginData,
msg.channel,
`Warned **${memberToWarn.user.username}#${memberToWarn.user.discriminator}** (Case #${warnResult.case.case_number})${messageResultText}`,
`Warned **${memberToWarn.user.tag}** (Case #${warnResult.case.case_number})${messageResultText}`,
);
},
});

View file

@ -47,7 +47,7 @@ export const PostAlertOnMemberJoinEvt = modActionsEvt({
}
await alertChannel.send(
`<@!${member.id}> (${member.user.username}#${member.user.discriminator} \`${member.id}\`) joined with ${actions.length} prior record(s)`,
`<@!${member.id}> (${member.user.tag} \`${member.id}\`) joined with ${actions.length} prior record(s)`,
);
}
},

View file

@ -103,7 +103,7 @@ export async function actualKickMemberCmd(
}
// Confirm the action to the moderator
let response = `Kicked **${memberToKick.user.username}#${memberToKick.user.discriminator}** (Case #${kickResult.case.case_number})`;
let response = `Kicked **${memberToKick.user.tag}** (Case #${kickResult.case.case_number})`;
if (kickResult.notifyResult.text) response += ` (${kickResult.notifyResult.text})`;
sendSuccessMessage(pluginData, msg.channel, response);

View file

@ -85,24 +85,24 @@ export async function actualMuteUserCmd(
if (args.time) {
if (muteResult.updatedExistingMute) {
response = asSingleLine(`
Updated **${user.username}#${user.discriminator}**'s
Updated **${user.tag}**'s
mute to ${timeUntilUnmute} (Case #${muteResult.case.case_number})
`);
} else {
response = asSingleLine(`
Muted **${user.username}#${user.discriminator}**
Muted **${user.tag}**
for ${timeUntilUnmute} (Case #${muteResult.case.case_number})
`);
}
} else {
if (muteResult.updatedExistingMute) {
response = asSingleLine(`
Updated **${user.username}#${user.discriminator}**'s
Updated **${user.tag}**'s
mute to indefinite (Case #${muteResult.case.case_number})
`);
} else {
response = asSingleLine(`
Muted **${user.username}#${user.discriminator}**
Muted **${user.tag}**
indefinitely (Case #${muteResult.case.case_number})
`);
}

View file

@ -48,7 +48,7 @@ export async function actualUnmuteCmd(
pluginData,
msg.channel as TextChannel,
asSingleLine(`
Unmuting **${user.username}#${user.discriminator}**
Unmuting **${user.tag}**
in ${timeUntilUnmute} (Case #${result.case.case_number})
`),
);
@ -57,7 +57,7 @@ export async function actualUnmuteCmd(
pluginData,
msg.channel as TextChannel,
asSingleLine(`
Unmuted **${user.username}#${user.discriminator}**
Unmuted **${user.tag}**
(Case #${result.case.case_number})
`),
);