This commit is contained in:
powermaker450 2024-10-21 12:37:40 -04:00
parent e24b163a34
commit 31cb503bc1
2 changed files with 7 additions and 9 deletions

View file

@ -140,7 +140,6 @@ export async function execute(interaction: ChatInputCommandInteraction) {
let idHead = "\n" + heading("Confessions:", HeadingLevel.Two);
let idCount = false;
for (const member of bannedMembers) {
if (member.method === BanReason.ByUser) {
userHead += "\n" + `<@${member.user}>`;
userCount = true;
@ -155,11 +154,9 @@ export async function execute(interaction: ChatInputCommandInteraction) {
if (userCount && idCount) {
return userHead + idHead;
} else {
return userCount
? userHead
: idHead;
return userCount ? userHead : idHead;
}
}
};
try {
return interaction.reply({

View file

@ -287,10 +287,11 @@ export class StoreMan {
for (const guild of this.data) {
if (guild.id === guildId) {
// Only add the user to the ban list if they aren't banned already
!this.isBannedByUser(guildId, userId) && guild.settings.bans.push({
user: userId,
method: BanReason.ByUser
});
!this.isBannedByUser(guildId, userId) &&
guild.settings.bans.push({
user: userId,
method: BanReason.ByUser
});
this.saveFile();
return true;