1.1.1 • Published 10 months ago

@magicyan/discord-events v1.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months 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.1.1

10 months ago

1.1.0

10 months ago

1.0.16

11 months ago

1.0.15

1 year ago

1.0.14

1 year ago

1.0.13

1 year ago

1.0.12

1 year ago

1.0.11

1 year ago

1.0.10

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago