New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

@magicyan/discord-events

Package Overview
Dependencies
Maintainers
0
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@magicyan/discord-events

Extended events of discord.js

latest
Source
npmnpm
Version
1.2.1
Version published
Maintainers
0
Created
Source
Icon

Magicyan Discord Events

Install with

npm install @magicyan/discord-events
pnpm install @magicyan/discord-events
yarn add @magicyan/discord-events
bun 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

FAQs

Package last updated on 07 Feb 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts