1
1
mirror of https://github.com/Burn-E99/GroupUp.git synced 2026-06-04 08:53:49 -04:00

Initial setup for standard events

This commit is contained in:
Ean Milligan (Bastion)
2023-01-11 18:06:20 -05:00
parent 460a7ed557
commit 3e6168a396
14 changed files with 310 additions and 37 deletions

40
src/events/guildCreate.ts Normal file
View File

@@ -0,0 +1,40 @@
import config from '../../config.ts';
import {
// Discordeno deps
Bot,
Guild,
// Log4Deno deps
log,
LT,
// Discordeno deps
sendMessage,
} from '../../deps.ts';
import { infoColor1 } from '../commandUtils.ts';
import utils from '../utils.ts';
export const guildCreate = (bot: Bot, guild: Guild) => {
log(LT.LOG, `Handling joining guild ${utils.jsonStringifyBig(guild)}`);
sendMessage(bot, config.logChannel, {
embeds: [{
title: 'Guild Joined!',
color: infoColor1,
fields: [
{
name: 'Name:',
value: `${guild.name}`,
inline: true,
},
{
name: 'Id:',
value: `${guild.id}`,
inline: true,
},
{
name: 'Member Count:',
value: `${guild.memberCount}`,
inline: true,
},
],
}],
}).catch((e: Error) => utils.commonLoggers.messageSendError('mod.ts:95', 'Join Guild', e));
};