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

Improvements

This commit is contained in:
AnxietyisReal 2024-01-19 21:33:51 +11:00
parent b186ea260c
commit 5bc243d9b4
2 changed files with 1 additions and 2 deletions

View File

@ -17,7 +17,7 @@ export default class GuildMemberAdd {
let isBot = 'Bot'; let isBot = 'Bot';
if (!member.user.bot) isBot = 'Member'; if (!member.user.bot) isBot = 'Member';
if (!client.config.botSwitches.logs) return; if (!client.config.botSwitches.logs) return;
(client.channels.resolve(client.config.dcServer.channels.welcome) as Discord.TextChannel).send({embeds: [new client.embed().setColor(client.config.embedColor).setThumbnail(member.user.displayAvatarURL({size: 2048}) || member.user.defaultAvatarURL).setTitle(`Welcome to Daggerwin, ${member.user.username}!`).setFooter({text: `${index}${suffix} member`})]}) (client.channels.resolve(client.config.dcServer.channels.welcome) as Discord.TextChannel).send({embeds: [new client.embed().setColor(client.config.embedColor).setThumbnail(member.user.displayAvatarURL({size: 2048}) || member.user.defaultAvatarURL).setTitle(`Welcome to ${member.guild.name}, ${member.user.username}!`).setFooter({text: `${index}${suffix} member`})]})
const newInvites = await member.guild.invites.fetch(); const newInvites = await member.guild.invites.fetch();
const usedInvite = newInvites.find((inv:Discord.Invite)=>client.invites.get(inv.code)?.uses < inv.uses); const usedInvite = newInvites.find((inv:Discord.Invite)=>client.invites.get(inv.code)?.uses < inv.uses);
newInvites.forEach((inv:Discord.Invite)=>client.invites.set(inv.code,{uses: inv.uses, creator: inv.inviterId, channel: inv.channel.name})); newInvites.forEach((inv:Discord.Invite)=>client.invites.set(inv.code,{uses: inv.uses, creator: inv.inviterId, channel: inv.channel.name}));

View File

@ -118,7 +118,6 @@ export class PunishmentsSvc {
break; break;
default: default:
channel = this.client.config.dcServer.channels.logs; channel = this.client.config.dcServer.channels.logs;
console.log('[Punishment] BKL channel doesn\'t seem to exist anymore, falling back to #bot-log.')
break; break;
} }
const embed = new this.client.embed() const embed = new this.client.embed()