1
0
mirror of https://github.com/toast-ts/Daggerbot-TS.git synced 2024-11-18 04:40:59 -05:00

Compare commits

..

No commits in common. "0ad5c2cc375a6cd9f697a02e8f6cded63629b51a" and "9d1c8dd238ffb36fa4881b41e3222d3908ead068" have entirely different histories.

2 changed files with 2 additions and 7 deletions

View File

@ -128,7 +128,7 @@ export default class Developer {
const member = interaction.options.getMember('member');
const message = interaction.options.getString('message');
const int = await interaction.reply({content: '*Sending...*', fetchReply: true});
client.users.cache.get(member.id).send(`${message}\n╰ *Pseudonymous User*`).then(()=>int.edit(`Successfully sent a DM to **${member.user.username}** with the following message:\n\`\`\`${message}\`\`\``)).catch((e:Error)=>int.edit(`\`${e.message}\``))
client.users.cache.get(member.id).send(`${message}\n╰ ${interaction.member.displayName}`).then(()=>int.edit(`Successfully sent a DM to **${member.user.username}** with the following message:\n\`\`\`${message}\`\`\``)).catch((e:Error)=>int.edit(`\`${e.message}\``))
},
modify_rank_msgs: async()=>{
if (interaction.guildId !== client.config.dcServer.id) return interaction.reply({content: 'This command is only available in the main server.', ephemeral: true});

View File

@ -10,12 +10,7 @@ import MessageTool from '../helpers/MessageTool.js';
export default class MessageCreate {
static async run(client:TClient, message:Discord.Message) {
if (message.author.bot) return;
if (!message.inGuild()) {
let fwdImages:string[] = [];
message.attachments.forEach(x=>fwdImages.push(x.url));
(client.channels.resolve(client.config.dcServer.channels.bot_log) as Discord.TextChannel).send({content: `${this.randomEmotes[Math.floor(Math.random()*this.randomEmotes.length)]} ${MessageTool.formatMention(client.config.whitelist[0], 'user')}\n**${message.author.username}** (\`${message.author.id}\`) sent me a DM, their message is:\`\`\`${message.content.length < 1 ? '(No content)' : message.content}\`\`\``, files: fwdImages, allowedMentions: {parse: ['users']}});
return;
}
if (!message.inGuild()) return (client.channels.resolve(client.config.dcServer.channels.bot_log) as Discord.TextChannel).send({content: `${this.randomEmotes[Math.floor(Math.random()*this.randomEmotes.length)]} ${MessageTool.formatMention(client.config.whitelist[0], 'user')}\n**${message.author.username}** (\`${message.author.id}\`) sent me a DM, their message is:\`\`\`${message.content}\`\`\``, allowedMentions: {parse: ['users']}});
let automodded: boolean;
if (client.config.botSwitches.automod && !message.member?.roles.cache.has(client.config.dcServer.roles.dcmod) && !message.member?.roles.cache.has(client.config.dcServer.roles.admin) && message.guildId === client.config.dcServer.id) {