1.0.15 • Published 6 days ago

@magicyan/discord-events v1.0.15

Weekly downloads
-
License
MIT
Repository
github
Last release
6 days ago

Magicyan Discord Events

Install with

npm install @magicyan/discord-events

This lib adds more discord.js specific events

Setup

Create your bot client normally and pass it to the initDiscordEvents function, so that events can be registered

import { Client } from "discord.js";
import { initDiscordEvents } from "@magicyan/discord-events";

const client = new Client({
    intents: [/* add your intents ... */]
    // set your client options ...
});

initDiscordEvents(client);

How to use

You can create a listener for the event in the same way you create it for standard discord.js events

client.on("guildMemberConnect", (member, channel) => {
    console.log(member.displayName, "joined the" channel.name);
})

See below the list of all events

EventParametersDescription
webhookMessageCreatemessage, webhookEmitted when a webhook message is created.
guildMemberConnectmember, voiceChannelEmitted when a member connect to voice channel in a guild.
guildMemberDisconnectmember, voiceChannelEmitted when a member disconnect from voice channel in a guild.
guildMemberMovedmember, executor, oldVoiceChannel, newVoiceChannelEmitted when a member is moved from one voice channel to another.
guildMemberTimeoutAddmember, executor, expireAt, reasonEmitted when a member gets a timeout
guildMemberTimeoutAddmember, executorEmitted when a member has a timeout removed
userKickuser, executor, reason, guildEmitted when a user is kicked from the guild
userBanAdduser, executor, reason, guildEmitted when a user is banned from the guild
userBanRemoveuser, executor, reason, guildEmitted when a user's ban is removed
extendedRoleCreaterole, executorEmitted when a role is created
extendedRoleUpdaterole, changes, executorEmitted when a role is updated
extendedRoleDeletedeletedRole, executorEmitted when a role is deleted
1.0.15

6 days ago

1.0.14

17 days ago

1.0.13

2 months ago

1.0.12

3 months ago

1.0.11

4 months ago

1.0.10

4 months ago

1.0.9

4 months ago

1.0.8

4 months ago

1.0.7

4 months ago

1.0.6

4 months ago

1.0.5

4 months ago

1.0.4

4 months ago

1.0.2

8 months ago

1.0.1

8 months ago

1.0.0

8 months ago