summaryrefslogtreecommitdiff
path: root/src/bot.ts
diff options
context:
space:
mode:
author8cy <[email protected]>2020-05-07 14:53:02 -0700
committer8cy <[email protected]>2020-05-07 14:53:02 -0700
commitd39052e139057b8303d79bb4192f677879797c92 (patch)
tree650c50f569f19f114be01ebe3dbf0aabfd6b54bc /src/bot.ts
parentremove this bc this is unused and outdated (diff)
downloaddep-core-d39052e139057b8303d79bb4192f677879797c92.tar.xz
dep-core-d39052e139057b8303d79bb4192f677879797c92.zip
add cmd logging and join server logging to support server
- add depreciated join cmd *lol* - fix some formatting in btc and add defaults - add zero two cmd - add fortnite alias to fortnitestats
Diffstat (limited to 'src/bot.ts')
-rw-r--r--src/bot.ts9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/bot.ts b/src/bot.ts
index bfd2ea2..452df4f 100644
--- a/src/bot.ts
+++ b/src/bot.ts
@@ -1,5 +1,6 @@
import config from './config.json';
import { CommandoClient } from 'discord.js-commando';
+// @ts-ignore no default import
import WS from './server';
import Welcome from './models/welcome.js';
import Goodbye from './models/goodbye.js';
@@ -82,9 +83,13 @@ client.on('warn', console.warn)
client.on('guildCreate', guild => {
console.log(`Joined server: ${guild.name}`)
guild.owner?.send('Hi! Thank you for inviting my bot to your server! To view the complete list of commands, do `uwu!help`. If you\'d like, you can also change the prefix using `uwu!prefix change <prefix>`. If you want to contact the lead developer for possible suggestions or to report a bug, please join the support server: https://crack.cf/uwufier-support. ' + emoji.random())
+ //@ts-ignore
+ client.guilds.cache.get('704032355987488791')?.channels.cache.get('706818034999754792')?.send(`Joined server: **${guild.name}**.`)
})
client.on('guildDelete', guild => {
console.log(`Left server: ${guild.name}`)
+ //@ts-ignore
+ client.guilds.cache.get('704032355987488791')?.channels.cache.get('706818034999754792')?.send(`Joined server: **${guild.name}**.`)
})
client.on('guildMemberAdd', member => {
@@ -126,8 +131,12 @@ client.on('message', async msg => {
if (prefixCheck()) {
if (msg.channel.type == 'dm') {
console.log(msg.author.tag, 'says', msgContent, 'in a DM');
+ //@ts-ignore
+ client.guilds.cache.get('704032355987488791')?.channels.cache.get('706818034999754792')?.send(`**${msg.author.tag}** says **${msgContent}** in a **DM.**`)
} else {
console.log(msg.member?.user.tag, 'says', msgContent, 'in #' + msg.channel.name + ' in ' + msg.guild?.name);
+ //@ts-ignore
+ client.guilds.cache.get('704032355987488791')?.channels.cache.get('706818034999754792')?.send(`**${msg.author.tag}** says **${msgContent}** in **#${msg.channel.name}** in **${msg.guild?.name}**.`)
}
}