1
0
mirror of https://github.com/toast-ts/Daggerbot-TS.git synced 2024-11-17 16:30:58 -05:00

Compare commits

..

No commits in common. "6912392130ed0d69d46a5c02eeda258ec10b96b0" and "ccaa1579b986d8cf8610f04659f9c5871745c010" have entirely different histories.

2 changed files with 5 additions and 5 deletions

View File

@ -31,10 +31,10 @@ export default class InteractionCreate {
const RoleID = interaction.customId.replace('reaction-','');
let roleConflictMsg = 'Cannot have both roles! - Button Role';
const MFFarm1 = '1149139369433776269';
const MFFarm2 = '1149139583729160325';
if (interaction.member.roles.cache.has(MFFarm1) && RoleID === MFFarm2) interaction.member.roles.remove(MFFarm1, roleConflictMsg);
else if (interaction.member.roles.cache.has(MFFarm2) && RoleID === MFFarm1) interaction.member.roles.remove(MFFarm2, roleConflictMsg);
const WestFarm = '1149139369433776269';
const EastFarm = '1149139583729160325';
if (interaction.member.roles.cache.has(WestFarm) && RoleID === EastFarm) interaction.member.roles.set([EastFarm], roleConflictMsg);
else if (interaction.member.roles.cache.has(EastFarm) && RoleID === WestFarm) interaction.member.roles.set([WestFarm], roleConflictMsg);
if (interaction.member.roles.cache.has(RoleID)) interaction.member.roles.remove(RoleID, 'Button Role').then(()=>interaction.reply({content: `You have been removed from <@&${RoleID}>`, ephemeral: true}));
else interaction.member.roles.add(RoleID, 'Button Role').then(()=>interaction.reply({content: `You have been added to <@&${RoleID}>`, ephemeral: true}));

View File

@ -114,7 +114,7 @@ export class PunishmentsSvc {
return Math.max(...result.map((x:Punishment)=>x.case_id), 0) + 1;
}
async caseEvasionCheck(member:Discord.GuildMember) {
if (await this.model.findOne({where: {member: member.id, type: 'mute', expired: null}})) {
if (await this.model.findOne({where: {member: member.id, type: 'mute', expired: undefined}})) {
(this.client.channels.cache.get(this.client.config.dcServer.channels.dcmod_chat) as Discord.TextChannel).send({embeds: [new this.client.embed().setColor(this.client.config.embedColorYellow).setTitle('Case evasion detected').setDescription(MessageTool.concatMessage(
`**${member.user.username}** (\`${member.user.id}\`) has been detected for case evasion.`,
'Timeout has been automatically added. (25 days)'