mirror of
https://github.com/veganhacktivists/arabot.git
synced 2025-10-19 13:27:40 +02:00
refactor(arabot): change comments to reflect the command
This commit is contained in:
parent
4dc37ab31c
commit
e348b09f80
@ -79,7 +79,7 @@ export class WarningsCommand extends Command {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// Non Application Command method of banning a user
|
// Non Application Command method for fetching warnings
|
||||||
public async messageRun(message: Message, args: Args) {
|
public async messageRun(message: Message, args: Args) {
|
||||||
// Get arguments
|
// Get arguments
|
||||||
let user: User | undefined;
|
let user: User | undefined;
|
||||||
@ -148,14 +148,14 @@ export class WarningsCommand extends Command {
|
|||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Creates the embed to display the restrictions
|
// Creates an embed to display the warnings
|
||||||
const embed = new EmbedBuilder()
|
const embed = new EmbedBuilder()
|
||||||
.setColor('#FF6700')
|
.setColor('#FF6700')
|
||||||
.setTitle(`${warnings.length} restrictions for ${user.tag}`)
|
.setTitle(`${warnings.length} restrictions for ${user.tag}`)
|
||||||
.setThumbnail(user.displayAvatarURL())
|
.setThumbnail(user.displayAvatarURL())
|
||||||
.setFooter({ text: `ID: ${user.id}` });
|
.setFooter({ text: `ID: ${user.id}` });
|
||||||
|
|
||||||
// Add up to 10 of the latest restrictions to the embed
|
// Add up to 10 of the latest warnings to the embed
|
||||||
for (
|
for (
|
||||||
let i = warnings.length > 10 ? warnings.length - 10 : 0;
|
let i = warnings.length > 10 ? warnings.length - 10 : 0;
|
||||||
i < warnings.length;
|
i < warnings.length;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user