feat(events/developper): adding developpeur / host event
This commit is contained in:
parent
d8b7cdd678
commit
7f07f9817c
3 changed files with 31 additions and 0 deletions
11
src/events/developper/debug.ts
Normal file
11
src/events/developper/debug.ts
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
import { Events } from 'discord.js';
|
||||||
|
import chalk from 'chalk';
|
||||||
|
const isDebug = process.argv.includes('--debug');
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: Events.Debug,
|
||||||
|
once: false,
|
||||||
|
async execute(info: string) {
|
||||||
|
if (isDebug) {console.debug(chalk.blueBright('🔍 |', info));}
|
||||||
|
},
|
||||||
|
};
|
||||||
10
src/events/developper/error.ts
Normal file
10
src/events/developper/error.ts
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
import { Events } from 'discord.js';
|
||||||
|
import chalk from 'chalk';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: Events.Error,
|
||||||
|
once: false,
|
||||||
|
async execute(error: string) {
|
||||||
|
console.debug(chalk.yellow('❌ |', error));
|
||||||
|
},
|
||||||
|
};
|
||||||
10
src/events/developper/warn.ts
Normal file
10
src/events/developper/warn.ts
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
import { Events } from 'discord.js';
|
||||||
|
import chalk from 'chalk';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: Events.Warn,
|
||||||
|
once: false,
|
||||||
|
async execute(warn: string) {
|
||||||
|
console.debug(chalk.yellow('⚠️ |', warn));
|
||||||
|
},
|
||||||
|
};
|
||||||
Loading…
Add table
Add a link
Reference in a new issue