This commit is contained in:
Christer Warén 2021-08-28 11:07:47 +03:00
parent 5f5b164e0d
commit f0dcd76033
3 changed files with 6 additions and 4 deletions

View File

@ -43,11 +43,11 @@ class RadioClient extends Client {
}
this.on("ready", () => {
require(`${events}ready`).execute(this, Discord);
require(`${events}ready`).execute(this);
this.datastore = new Datastore();
});
this.on("interactionCreate", interaction => {
require(`${events}interactionCreate`).execute(this, interaction, Discord);
require(`${events}interactionCreate`).execute(this, interaction);
});
this.on("voiceStateUpdate", (oldState, newState) => {
require(`${events}voiceStateUpdate`).execute(this, oldState, newState);

View File

@ -1,6 +1,8 @@
import Discord from "discord.js";
module.exports = {
name: 'interactionCreate',
async execute(client, interaction, Discord) {
async execute(client, interaction) {
if (!interaction.isCommand()) return;
const commandName = interaction.commandName;

View File

@ -2,7 +2,7 @@ const fetch = require('node-fetch');
module.exports = {
name: 'ready',
async execute(client, Discord) {
async execute(client) {
console.log('RadioX ' + client.config.version);
console.log('Internet Radio to your Discord guild');