mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-10 04:25:01 +00:00
user.tag
This commit is contained in:
parent
3d29963b87
commit
74a676913e
38 changed files with 59 additions and 93 deletions
|
@ -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`);
|
||||
}
|
||||
|
|
|
@ -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})`;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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}**`);
|
||||
|
|
|
@ -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"));
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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}`,
|
||||
);
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue