Skip to content

Latest commit

 

History

History
42 lines (41 loc) · 768 Bytes

File metadata and controls

42 lines (41 loc) · 768 Bytes

Events

Client Events

Format

export const Event = {
    name: "clientEventName",
    run: async(<event args>) => {
        // Code
    }
};

Example Code

export const Event = {
    name: "channelCreate", // Omitted whenever a channel is created in a guild.
    run: (channel) => {
        console.log(`A new channel was created in the ${channel.guild.name} of the name ${channel.name}.`);
    }
};

Non-Client Events

Format

export const Event = {
    customEvent: true,
    run: async(client) => {
        // Code
    }
};

Example Code

export const Event = {
    customEvent: true,
    run: (client) => {
        client.Distube.on("addSong", (queue, song) => {
            // Your Code
        });
    }
};