mirror of
https://github.com/toast-ts/Daggerbot-TS.git
synced 2024-11-17 12:21:00 -05:00
Tidy up commented out code.
This commit is contained in:
parent
5d3757100e
commit
e08d6034ec
@ -2,7 +2,6 @@ import Discord from 'discord.js';
|
||||
import { TClient } from '../client';
|
||||
export default {
|
||||
async run(client:TClient, member:Discord.GuildMember){
|
||||
//if (member.partial) return;
|
||||
if (
|
||||
member.partial
|
||||
|| member.guild?.id != client.config.mainServer.id
|
||||
|
@ -7,7 +7,6 @@ export default {
|
||||
!member.joinedTimestamp
|
||||
|| member.guild?.id != client.config.mainServer.id
|
||||
) return;
|
||||
// if (member.guild?.id != client.config.mainServer.id) return;
|
||||
const embed = new client.embed().setColor(client.config.embedColorRed).setTimestamp().setThumbnail(member.user.displayAvatarURL({size: 2048}) as string).setTitle(`Member Left: ${member.user.tag}`).setDescription(`<@${member.user.id}>\n\`${member.user.id}\``).addFields(
|
||||
{name: '🔹 Account Creation Date', value: `<t:${Math.round(member.user.createdTimestamp/1000)}>\n<t:${Math.round(member.user.createdTimestamp/1000)}:R>`},
|
||||
{name: '🔹 Server Join Date', value: `<t:${Math.round(member.joinedTimestamp/1000)}>\n<t:${Math.round(member.joinedTimestamp/1000)}:R>`},
|
||||
|
@ -6,10 +6,7 @@ export default {
|
||||
if (!client.config.botSwitches.logs) return;
|
||||
const channel = (client.channels.resolve(client.config.mainServer.channels.logs) as Discord.TextChannel)
|
||||
if (oldMember.nickname != newMember.nickname){
|
||||
const embed = new client.embed().setColor(client.config.embedColor).setTimestamp().setThumbnail(newMember.user.displayAvatarURL({size: 2048})).setTitle(`Nickname updated: ${newMember.user.tag}`).setDescription(`<@${newMember.user.id}>\n\`${newMember.user.id}\``)/*.addFields(
|
||||
{name: '🔹 Old nickname', value: oldMember.nickname == null ? 'No nickname' : `\`\`\`${oldMember.nickname}\`\`\``},
|
||||
{name: '🔹 New nickname', value: newMember.nickname == null ? 'No nickname' : `\`\`\`${newMember.nickname}\`\`\``}
|
||||
);*/
|
||||
const embed = new client.embed().setColor(client.config.embedColor).setTimestamp().setThumbnail(newMember.user.displayAvatarURL({size: 2048})).setTitle(`Nickname updated: ${newMember.user.tag}`).setDescription(`<@${newMember.user.id}>\n\`${newMember.user.id}\``)
|
||||
oldMember.nickname == null ? '' : embed.addFields({name: '🔹 Old nickname', value: `\`\`\`${oldMember.nickname}\`\`\``})
|
||||
newMember.nickname == null ? '' : embed.addFields({name: '🔹 New nickname', value: `\`\`\`${newMember.nickname}\`\`\``})
|
||||
channel.send({embeds: [embed]})
|
||||
|
@ -6,7 +6,6 @@ export default {
|
||||
message.author.bot
|
||||
|| message.channel.type === ChannelType.DM
|
||||
) return;
|
||||
// if (message.channel.type === ChannelType.DM) return;
|
||||
const msgarr = message.content.toLowerCase().split(' ');
|
||||
let automodded: boolean;
|
||||
|
||||
|
@ -13,9 +13,6 @@ export default {
|
||||
|| msg.author.bot
|
||||
|| disabledChannels.includes(msg.channelId)
|
||||
) return;
|
||||
// if (msg.partial) return;
|
||||
// if (msg.author.bot) return;
|
||||
// if (disabledChannels.includes(msg.channelId)) return;
|
||||
const embed = new client.embed().setColor(client.config.embedColorRed).setTimestamp().setAuthor({name: `Author: ${msg.author.tag} (${msg.author.id})`, iconURL: `${msg.author.displayAvatarURL()}`}).setTitle('Message deleted').setDescription(`<@${msg.author.id}>\n\`${msg.author.id}\``);
|
||||
if (msg.content.length != 0) embed.addFields({name: 'Content', value: `\`\`\`\n${msg.content.slice(0,1000)}\n\`\`\``});
|
||||
embed.addFields(
|
||||
|
@ -15,12 +15,6 @@ export default {
|
||||
|| !newMsg.member
|
||||
|| disabledChannels.includes(newMsg.channelId)
|
||||
) return;
|
||||
// if (oldMsg.author == null) return;
|
||||
// if (oldMsg?.author.bot) return;
|
||||
// if (oldMsg.partial) return;
|
||||
// if (newMsg.partial) return;
|
||||
// if (!newMsg.member) return;
|
||||
// if (disabledChannels.includes(newMsg.channelId)) return;
|
||||
const msgarr = newMsg.content.toLowerCase().split(' ');
|
||||
if (client.bannedWords._content.some((word:string)=>msgarr.includes(word)) && (!client.isStaff(newMsg.member))) newMsg.delete();
|
||||
if (newMsg.content === oldMsg.content) return;
|
||||
|
Loading…
Reference in New Issue
Block a user