File tree Expand file tree Collapse file tree 2 files changed +8
-12
lines changed Expand file tree Collapse file tree 2 files changed +8
-12
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ export default class CommandHandler {
25
25
private readonly commands : Map < string [ ] , Command > ;
26
26
private readonly help : string ;
27
27
28
- constructor ( private readonly production : boolean ) {
28
+ constructor ( ) {
29
29
const availableCommands = new Array < string > ( ) ;
30
30
31
31
this . commands = new Map (
@@ -70,15 +70,12 @@ export default class CommandHandler {
70
70
71
71
/** Executes user commands contained in a message if appropriate. */
72
72
async handleCommandInteraction ( interaction : Interaction ) : Promise < void > {
73
- if ( ! this . production ) {
74
- const msg = `Buggie bot received ${ JSON . stringify (
75
- interaction ,
76
- ( _ , v ) => ( typeof v === "bigint" ? `${ v . toString ( ) } n` : v ) ,
77
- 4
78
- ) } from '${ interaction . user . tag } `;
79
- // await interaction.channel?.send(msg);
80
- console . log ( msg ) ;
81
- }
73
+ const msg = `Buggie bot received ${ JSON . stringify (
74
+ interaction ,
75
+ ( _ , v ) => ( typeof v === "bigint" ? `${ v . toString ( ) } n` : v ) ,
76
+ 4
77
+ ) } from '${ interaction . user . tag } `;
78
+ console . log ( msg ) ;
82
79
83
80
if ( ! interaction . isCommand ( ) ) throw new Error ( "Invalid command interaction" ) ;
84
81
Original file line number Diff line number Diff line change @@ -15,7 +15,6 @@ import Discord, {
15
15
Partials ,
16
16
} from "discord.js" ;
17
17
import CommandHandler from "@/commandHandler" ;
18
- import config from "@/config/botConfig" ;
19
18
import { env } from "@/config/env" ;
20
19
21
20
process . on ( "unhandledRejection" , reason => {
@@ -31,7 +30,7 @@ const client = new Discord.Client({
31
30
partials : [ Partials . Message , Partials . Channel , Partials . Reaction ] ,
32
31
} ) ;
33
32
34
- const commandHandler = new CommandHandler ( config . production ) ;
33
+ const commandHandler = new CommandHandler ( ) ;
35
34
36
35
client . once ( Events . ClientReady , ( ) => {
37
36
if ( client . user != null ) {
You can’t perform that action at this time.
0 commit comments