discord.js is a powerful Node.js module that allows you to easily interact with the Discord API.

Overview

discord.js


Discord server NPM version NPM downloads Build status Dependencies Patreon

npm installnfo

Table of contents

About

discord.js is a powerful Node.js module that allows you to easily interact with the Discord API.

  • Object-oriented
  • Predictable abstractions
  • Performant
  • 100% coverage of the Discord API

Installation

Node.js 14.0.0 or newer is required.
Ignore any warnings about unmet peer dependencies, as they're all optional.

Without voice support: npm install discord.js
With voice support (@discordjs/opus): npm install discord.js @discordjs/opus
With voice support (opusscript): npm install discord.js opusscript

Audio engines

The preferred audio engine is @discordjs/opus, as it performs significantly better than opusscript. When both are available, discord.js will automatically choose @discordjs/opus. Using opusscript is only recommended for development environments where @discordjs/opus is tough to get working. For production bots, using @discordjs/opus should be considered a necessity, especially if they're going to be running on multiple servers.

Optional packages

  • zlib-sync for WebSocket data compression and inflation (npm install zlib-sync)
  • erlpack for significantly faster WebSocket data (de)serialisation (npm install discord/erlpack)
  • One of the following packages can be installed for faster voice packet encryption and decryption:
  • bufferutil for a much faster WebSocket connection (npm install bufferutil)
  • utf-8-validate in combination with bufferutil for much faster WebSocket processing (npm install utf-8-validate)

Example usage

const { Client, Intents } = require('discord.js');
const client = new Client({ intents: [Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_MESSAGES] });

client.on('ready', () => {
  console.log(`Logged in as ${client.user.tag}!`);
});

client.on('message', msg => {
  if (msg.content === 'ping') {
    msg.channel.send('pong');
  }
});

client.login('token');

Links

Extensions

Contributing

Before creating an issue, please ensure that it hasn't already been reported/suggested, and double-check the documentation.
See the contribution guide if you'd like to submit a PR.

Help

If you don't understand something in the documentation, you are experiencing problems, or you just need a gentle nudge in the right direction, please don't hesitate to join our official Discord.js Server.

Comments
  • jeez like what the

    jeez like what the

    #jeez like what the
    
    ~ $ node storage/shared/stuff/hazy/hazy.js
    (node:5452) UnhandledPromiseRejectionWarning: ReferenceError: AbortController is not defined
        at RequestHandler.execute (/storage/emulated/0/stuff/hazy/node_modules/discord.js/src/rest/RequestHandler.js:172:15)
        at RequestHandler.execute (/storage/emulated/0/stuff/hazy/node_modules/discord.js/src/rest/RequestHandler.js:176:19)
        at RequestHandler.push (/storage/emulated/0/stuff/hazy/node_modules/discord.js/src/rest/RequestHandler.js:50:25)
        at async WebSocketManager.connect (/storage/emulated/0/stuff/hazy/node_modules/discord.js/src/client/websocket/WebSocketManager.js:128:9)
        at async Client.login (/storage/emulated/0/stuff/hazy/node_modules/discord.js/src/client/Client.js:245:7)
    (Use `node --trace-warnings ...` to show where the warning was created)
    (node:5452) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
    (node:5452) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
    

    discord.js version

    dont know, maybe the newest

    Node.js version

    dont know, maybe thhhe newest

    Operating system

    android (termux application)

    Priority this issue should have

    High (immediate attention needed)

    Which partials do you have configured?

    USER, CHANNEL, GUILD_MEMBER, MESSAGE, REACTION

    Which gateway intents are you subscribing to?

    GUILDS, GUILD_MEMBERS, GUILD_EMOJIS_AND_STICKERS, GUILD_INTEGRATIONS, GUILD_WEBHOOKS, GUILD_INVITES, GUILD_VOICE_STATES, GUILD_PRESENCES, GUILD_MESSAGES, GUILD_MESSAGE_REACTIONS, GUILD_MESSAGE_TYPING, DIRECT_MESSAGES, DIRECT_MESSAGE_REACTIONS, DIRECT_MESSAGE_TYPING

    I have tested this issue on a development release

    i dont know what is this

    question (please use Discord instead) 
    opened by ghost 503
  • Timeout - Shards With Unavailable Guilds Not Starting

    Timeout - Shards With Unavailable Guilds Not Starting

    Please describe the problem you are having in as much detail as possible: When I start my bot sharded bot (in 4240 servers), one of the shards times out and stops starting. This issue is persistent across all versions of djs, including 12. The timeout happens around 90% of the time I start the shards. Here are the errors and messages I receive in the console for that shard.

    Error: Shard 1's Client took too long to become ready. Error: Something took too long to do. Left a guild called undefined.

    The last message is me logging the guild leave event, which also seems to be firing from that specific shard.

    Include a reproducible code sample here, if possible:

    My Sharding File (Code for version 11):

    const { ShardingManager } = require('discord.js');
    const manager = new ShardingManager('./bot.js', { token: process.env.TOKEN });
    
    manager.spawn(20); // Start 4 Shards
    manager.on('launch', shard => console.log("Sharding Manager ➜".bold.brightYellow, `Launched shard ${shard.id}`.bold.brightCyan));
    

    Code for Ready event:

    client.login(process.env.TOKEN).catch(console.error)
    
    client.on('ready', (i, callback) => {
        functions.log(`Online in ${client.guilds.size} servers!`)
    
        blapi.handle(client, apiKeys, 10);
    
        setTimeout(() => {
            /* Bot Presence (Game and Status) */
            client.shard.fetchClientValues('guilds.size').then(results => {
    
                let servercount = results.reduce((prev, guildCount) => prev + guildCount, 0)
    
                client.user.setPresence({
                    game: {
                    type: 0,
                    name: game + " | " + servercount
                    //name: 'Discord API Error ➜ https://status.discordapp.com'
                    },
                    status: status
                });
    
                if (client.shard.id === 3) {
                    Glenn.updateStats(servercount, client.shard.count);
                    functions.postStats(client)
                    functions.log(`Posted ${servercount} servers!`)
                }
            })
        },60000);
    });
    

    The error is persistent across different IP addresses and computers, and I get no email from discord.

    Further details:

    • discord.js version: 11.4.2, 11.5.1, 11.6.1, 12, 12.0.2
    • Node.js version: v12.15.0
    • Operating system: Ubuntu & Mac
    • Priority this issue should have – please be realistic and elaborate if possible: Not sure...
    • [x] I have also tested the issue on latest master, commit hash:
    bug gateway need repro sharding 
    opened by tandpfun 77
  • guildMemberSpeaking event no longer working?

    guildMemberSpeaking event no longer working?

    Please describe the problem you are having in as much detail as possible:

    All of a sudden the "guildMemberSpeaking" stopped working. The bot was running did not crash, no errors, all of a sudden the event stop working. It will however emit once when a user starts talking but never will again for that user.

    The following is an example of my entire test bot to show the issue:

    const path = require('path');
    SERVER_DIST = (path.basename(__filename) == "bot.js" ? "prod" : "beta");
    CONFIG = require('./config.js').loadVar(SERVER_DIST);
    
    const Discord = require('discord.js');
    const client = new Discord.Client();
    
    client.on('error', console.error);
    
    client.on('ready', () => {
    	console.log(`Logged in as ${client.user.tag}!`);
    	let voiceChan = client.channels.get(CONFIG.ids.mainVoiceChanID);
    	voiceChan.join().then(connection => {
    		console.log('Connected to voice channel.');
    	}).catch(err => console.log(err)); 
    });
    
    client.on('guildMemberSpeaking', (member, speaking) => {
    	if(speaking) {
    		console.log(member.displayName + ' started talking.');    
    	}
    	else {
    		console.log(member.displayName + ' stopped talking');
    	}
    });
    
    client.login(CONFIG.discordApi.token);
    

    Further details:

    • discord.js version: 11.5.1
    • Node.js version: v10.15.3
    • Operating system: CentOS release 6.10 (Final)
    • Priority this issue should have – please be realistic and elaborate if possible: We use this event to track voice activity in a voice channel, this is very important to this bots usage.
    • [ ] I have also tested the issue on latest master, commit hash:
    opened by tacodan 75
  • Bot randomly exiting process or going offline/unresponsive

    Bot randomly exiting process or going offline/unresponsive

    Which package is this bug report for?

    discord.js

    Issue description

    After around 5-6 hours of running, my discord bot decides to randomly exit with an exit code of 0. There is nothing in my code that should cause that, and adding a debug event listener shows the bot failing around a websocket reacquisition near the 6 hour mark.

    I have tried running my bot with typescript, I've tried compiling the code to javascript and running that, I've tried packaging it as a docker container and running that locally, I've tried packing it as a docker container and running that on my production server. Every environment and method results in the same issue.

    image

    Bot code

    https://github.com/NeonWizard/sockbot-discord

    Logs

    [WS => Shard 0] Heartbeat acknowledged, latency of 86ms.
    [WS => Shard 0] [HeartbeatTimer] Sending a heartbeat.
    [WS => Shard 0] Heartbeat acknowledged, latency of 89ms.
    [WS => Shard 0] [HeartbeatTimer] Sending a heartbeat.
    [WS => Shard 0] Heartbeat acknowledged, latency of 85ms.
    [WS => Shard 0] [HeartbeatTimer] Sending a heartbeat.
    [WS => Shard 0] Heartbeat acknowledged, latency of 83ms.
    [WS => Shard 0] [HeartbeatTimer] Sending a heartbeat.
    [WS => Shard 0] Heartbeat acknowledged, latency of 84ms.
    [WS => Shard 0] [RECONNECT] Discord asked us to reconnect
    [WS => Shard 0] [DESTROY]
        Close Code    : 4000
        Reset         : false
        Emit DESTROYED: true
    [WS => Shard 0] Clearing the heartbeat interval.
    [WS => Shard 0] [WebSocket] Destroy: Attempting to close the WebSocket. | WS State: OPEN      
    [WS => Shard 0] [WebSocket] Close: Tried closing. | WS State: CLOSING
    [WS => Shard 0] [WebSocket] Adding a WebSocket close timeout to ensure a correct WS reconnect.
            Timeout: 5000ms
    [WS => Shard 0] [WebSocket] Clearing the close timeout.
    [WS => Shard 0] [WebSocket] Close Emitted: false
    [WS => Shard 0] [WebSocket] did not close properly, assuming a zombie connection.
    Emitting close and reconnecting again.
    [WS => Shard 0] [CLOSE]
        Event Code: 1011
        Clean     : false
        Reason    : INTERNAL_ERROR
    [WS => Shard 0] Session id is present, attempting an immediate reconnect...
    [WS => Shard 0] [CONNECT]
        Gateway    : wss://gateway.discord.gg/
        Version    : 10
        Encoding   : json
        Compression: none
    [WS => Shard 0] Setting a HELLO timeout for 20s.
    [WS => Shard 0] [CONNECTED] Took 146ms
    [WS => Shard 0] Clearing the HELLO timeout.
    [WS => Shard 0] Setting a heartbeat interval for 41250ms.
    [WS => Shard 0] [RESUME] Session REDACTED, sequence 51
    [WS => Shard 0] [RESUMED] Session REDACTED | Replayed 1 events.       
    [WS => Shard 0] [ResumeHeartbeat] Sending a heartbeat.
    [WS => Shard 0] Heartbeat acknowledged, latency of 88ms.
    [WS => Shard 0] Clearing the heartbeat interval.
    [WS => Shard 0] [CLOSE]
        Event Code: 4000
        Clean     : true
        Reason    :
    [WS => Shard 0] Session id is present, attempting an immediate reconnect...
    [WS => Shard 0] An open connection was found, attempting an immediate identify.
    [WS => Shard 0] [RESUME] Session REDACTED, sequence 52
    root@ruby:/home/spooky#
    

    Code sample

    https://github.com/NeonWizard/sockbot-discord
    

    Package version

    [email protected]

    Node.js version

    v16.16.0, [email protected]

    Operating system

    Windows (WSL), Linux (Ubuntu), Docker (node:lts-alpine)

    Priority this issue should have

    High (immediate attention needed)

    Which partials do you have configured?

    No Partials

    Which gateway intents are you subscribing to?

    Guilds, GuildMessages, GuildMessageReactions, MessageContent

    I have tested this issue on a development release

    No response

    bug gateway has PR packages:discord.js 
    opened by NeonWizard 71
  • Random

    Random "Unknown interaction" errors sometimes

    Issue description

    I have a bot with clicks on buttons every second and people executing commands. This generally goes very well, but sometimes I get an "Unknown Interaction" when I defer to it.

    I've been debugging for the past three days and can't seem to understand why it's happening. My last possible explanation is an error in Discord.js or on the side of Discord.

    I have attached a few screenshots describing the error Screenshot_17 Screenshot_18

    I would prefer to know if this is due to my code, or Discord.js or Discord itself.

    Code sample

    // Button Handler
            if(interaction.isButton()) {
                console.log(customId);
                const button = client.buttons.get(customId);
                if(!button) return;
    
                let {
                    cooldown = -1,
                    deferUpdate = false
                } = button;
    
                if(deferUpdate) {
                    console.error('defer button');
                    const testHook = interaction;
                    console.error(interaction.member.user.username, interaction.member.id)
                    await interaction.deferUpdate();
                    console.error("doei", interaction.member.user.username, interaction.member.id)
                    
                }
                
                let buttonName = (customId.startsWith('games-all-')) ? "btn-games-all" : "btn-" + customId;
                console.log(buttonName);
                if(!cooldownButtons.has(buttonName)) {
                    console.log(buttonName, 'add cooldown')
                    cooldownButtons.set(buttonName, new Collection());
                }
    
                const currentBtnTime = Date.now();
                const timestamps = await cooldownButtons.get(buttonName);
                const cooldownAmount = (cooldown) * 1000;
    
                if(timestamps.has(member.id)) {
                    console.log(member.id, 'heeft cooldown')
                    const expirationTime = timestamps.get(member.id) + cooldownAmount;
    
                    if(currentBtnTime < expirationTime) {
                        console.log(member.id, 'heeft cooldown')
                        const time_left = (expirationTime - currentBtnTime) / 1000;
    
                        if(deferUpdate) {
                            return interaction.followUp({content: `**Cooldown:** You have to wait ${time_left.toFixed(1)} seconds.`, ephemeral: true});
                        }else{
                            return interaction.followUp({content: `**Cooldown:** You have to wait ${time_left.toFixed(1)} seconds.`, ephemeral: true});
                        }
                    }
                }else{
                    timestamps.set(member.id, currentBtnTime);
                    setTimeout(() => timestamps.delete(member.id), cooldownAmount);
    
                    try{
                        await button.execute(interaction);
                    }catch(error) {
                        console.error(error);
                    }
                }
            }
    

    discord.js version

    13.3.1

    Node.js version

    16.13.0

    Operating system

    Debian 10

    Priority this issue should have

    Medium (should be fixed soon)

    Which partials do you have configured?

    CHANNEL, GUILD_MEMBER, MESSAGE, REACTION

    Which gateway intents are you subscribing to?

    GUILDS, GUILD_MEMBERS, GUILD_INVITES, GUILD_VOICE_STATES, GUILD_MESSAGES, GUILD_MESSAGE_REACTIONS, DIRECT_MESSAGES

    I have tested this issue on a development release

    No response

    bug need repro REST packages:discord.js 
    opened by ikheetjeff 64
  • Bot still silently disconnecting

    Bot still silently disconnecting

    My issue seems related to issue #225.

    The bot will run and show as logged in for a channel for some time and then it will suddenly drop offline. However, it will still post messages that are scheduled to a text channel.

    autoReconnect is set to true as well.

    For a look at my bot see: https://github.com/ericnelson0/GoHBot/blob/master/index.js

    opened by ericnelson0 62
  • Spam reconnection

    Spam reconnection

    Please describe the problem you are having in as much detail as possible:

    Since several weeks (about 3 weeks) my spam bot reconnection to Discord, it happens a few hours or a few minutes after the launch of the shards (Less shards the more it will take time to spam reconnection) I have not made any modification for 4 weeks on my bot so I wonder if it comes from discord directly or from my code.

    I have already run it locally and same problem and several of my friends have the same problem on a different library of discord (eris) but also on discord.js

    Namely I use Discord.js 11.6.4

    I currently have 25 servers so I launched my bot plus 25 shards I had no problem for 2-3 minutes then the shards were restarted one after the other.

    Namely that I'm not testing another bot on the same VPS or PC

    https://imgur.com/c2Xbf0l.png

    Further details:

    • discord.js version: 11.6.5
    • Node.js version: 12.16.1
    • Operating system: Linux Debian (VPS) Windows 10 (Local)
    • Priority this issue should have - please be realistic and elaborate if possible: On a scale of 1 to 10 I would say 6/10

    Translated with www.DeepL.com/Translator (free version)

    bug gateway need repro packages:discord.js 
    opened by JusteLoneWolf 57
  • Permissions improvements

    Permissions improvements

    • Added Permission#toArray.
    • Allow singular PermissionResolvables as parameter to Permissions#missing.
    • Fix JSDoc.
    • Allow Permissions to be iterated over.
    • Removed unnecessary (and bugged) conditional statement in constructor. (could accept negative bitfields before)
    • Updated typings will be submitted as a PR when/if this one gets merged.

    Semantic versioning classification:

    • [x] This PR changes the library's interface (methods or parameters added)
      • [ ] This PR includes breaking changes (methods removed or renamed, parameters moved or removed)
    • [ ] This PR only includes non-code changes, like changes to documentation, README, etc.
    opened by ZLima12 50
  • Minimum node version requirement: >=16.6.0

    Minimum node version requirement: >=16.6.0

    Starting with v13.0.0 the minimum node version requirement for discord.js will be >=16.6.0 to make use of features like optional chaining, (ES2021) etc.

    Benefits:

    • Full access to ES2021 features

    Drawbacks:

    • Dropping node 12 support
    • Dropping node 14 support
    opened by iCrawl 48
  • interactions

    interactions

    Please describe the changes this PR makes and why it should be merged:

    Status

    This will need #4879 before it lands.

    • [x] Code changes have been tested against the Discord API, or there are no code changes
    • [ ] I know how to update typings and have done so, or typings don't need updating

    Semantic versioning classification:

    • [x] This PR changes the library's interface (methods or parameters added)
      • [ ] This PR includes breaking changes (methods removed or renamed, parameters moved or removed)
    • [ ] This PR only includes non-code changes, like changes to documentation, README, etc.
    opened by devsnek 48
  • Getting ratelimited

    Getting ratelimited

    Please describe the problem you are having in as much detail as possible: I am getting ratelimited by discord for an unknown reason As said here it should never happen but I do not know why this is happening for me https://github.com/discordjs/discord.js/blob/6be5051f9296fe9a10549f2f9a11c18776b1b617/src/rest/RequestHandler.js#L149

    For more information, it's happening frequently at 00:00 GMT

    I am also having a lot of 500 errors when this is happening.

    Include a reproducible code sample here, if possible:

    429 hit on route /gateway/bot
    
    Code : 500
    AbortError: The user aborted a request.
    at RequestHandler.execute (/home/koyamie/Koya/node_modules/discord.js/src/rest/RequestHandler.js:106:9)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    

    Further details:

    • discord.js version: lastest master
    • Node.js version: 12.13.0
    • Operating system: debian 9
    • Priority this issue should have – please be realistic and elaborate if possible:
    • [x] I have also tested the issue on latest master, commit hash:
    bug ratelimits REST sharding packages:discord.js 
    opened by Koyamie 48
  • feat(GuildAuditLogs): Support `after`

    feat(GuildAuditLogs): Support `after`

    Please describe the changes this PR makes and why it should be merged:

    • https://github.com/discord/discord-api-docs/pull/5821

    Status and versioning classification:

    • Code changes have been tested against the Discord API, or there are no code changes
    • I know how to update typings and have done so, or typings don't need updating
    api support semver:minor packages:discord.js 
    opened by Jiralite 1
  • Bot crash when initiating DM with a user

    Bot crash when initiating DM with a user

    Which package is this bug report for?

    discord.js

    Issue description

    1. Install latest version of discord.js
    2. Enable Channel partial
    3. Run the bot and wait for DM
    ERROR Uncaught Exception: TypeError: Cannot read properties of undefined (reading 'id')
        at DMChannel._patch (./node_modules/discord.js/src/structures/DMChannel.js:39:36)
        at new BaseChannel (./node_modules/discord.js/src/structures/BaseChannel.js:25:38)
        at new DMChannel (./node_modules/discord.js/src/structures/DMChannel.js:17:5)
        at createChannel (./node_modules/discord.js/src/util/Channels.js:30:17)
        at ChannelManager._add (./node_modules/discord.js/src/managers/ChannelManager.js:50:21)
        at MessageCreateAction.getPayload (./node_modules/discord.js/src/client/actions/Action.js:29:22)
        at MessageCreateAction.getChannel (./node_modules/discord.js/src/client/actions/Action.js:38:12)
        at MessageCreateAction.handle (./node_modules/discord.js/src/client/actions/MessageCreate.js:9:26)
        at module.exports [as MESSAGE_CREATE] (./node_modules/discord.js/src/client/websocket/handlers/MESSAGE_CREATE.js:4:32)
        at WebSocketManager.handlePacket (./node_modules/discord.js/src/client/websocket/WebSocketManager.js:352:31)
    

    Code sample

    No response

    Package version

    14.7.2-dev.1672747445-7dec892.0

    Node.js version

    18.12.1

    Operating system

    No response

    Priority this issue should have

    Medium (should be fixed soon)

    Which partials do you have configured?

    Channel

    Which gateway intents are you subscribing to?

    Guilds, GuildMembers, GuildPresences, GuildMessages, DirectMessages, MessageContent

    I have tested this issue on a development release

    7dec892

    bug need repro packages:discord.js 
    opened by Raiden-Ei 6
  • chore: remove proxy dep hack

    chore: remove proxy dep hack

    Please describe the changes this PR makes and why it should be merged: This has been possible since 9922151266a8ac618f41b7583c984a8755eccf14

    I have tested locally using docker build -t discordjs/proxy:latest -f packages/proxy-container/Dockerfile . and the image still builds.

    Status and versioning classification:

    • Code changes have been tested against the Discord API, or there are no code changes
    • I know how to update typings and have done so, or typings don't need updating
    • This PR only includes non-code changes, like changes to documentation, README, etc.
    chore packages:proxy-container 
    opened by didinele 2
  • feat(ws): metrics

    feat(ws): metrics

    Please describe the changes this PR makes and why it should be merged: Closes #8960.

    Ended up taking a different approach than what was originally proposed with https://github.com/discordjs/discord.js/issues/8960#issuecomment-1363232818 and later discussed internally.

    The new WebSocketManager#fetchStatus method and the new HeartbeatComplete event should be more than enough for all intents and purposes. I can't really envision what else you might want to track that you can't accomplish with the tools already provided, otherwise.

    Status and versioning classification:

    • Code changes have been tested against the Discord API, or there are no code changes
    • I know how to update typings and have done so, or typings don't need updating
    • This PR changes the library's interface (methods or parameters added)
    semver:minor packages:ws 
    opened by didinele 1
  • feat(ws): custom workers

    feat(ws): custom workers

    Please describe the changes this PR makes and why it should be merged: Another big stepping stone in prod usability - this time for folks trying to scale.

    Status and versioning classification:

    • Code changes have been tested against the Discord API, or there are no code changes
    • I know how to update typings and have done so, or typings don't need updating
    • This PR changes the library's interface (methods or parameters added)
    semver:major packages:ws 
    opened by didinele 3
Releases(@discordjs/[email protected])
  • @discordjs/[email protected](Dec 17, 2022)

  • @discordjs/[email protected](Dec 16, 2022)

  • @discordjs/[email protected](Dec 16, 2022)

  • @discordjs/[email protected](Dec 16, 2022)

  • @discordjs/[email protected](Dec 16, 2022)

  • 14.7.1(Dec 1, 2022)

  • 14.7.0(Nov 28, 2022)

    Bug Fixes

    • MessageMentions: Add InGuild generic (#8828) (f982803)
    • Activity: Fix equals() not checking for differing emoji (#8841) (7e06f68)
    • Fixed react/astro/guide/discord.js build, updated dependencies, fix crawlvatar (#8861) (d0c8256)
    • escapeMarkdown: Fix double escaping (#8798) (d6873b7)
    • Transfomers: Call .toJSON in toSnakeCase (#8790) (017f9b1)
    • Censor token in debug output (#8764) (53d8e87)
    • Pin @types/node version (9d8179c)

    Documentation

    • Describe InteractionEditReplyOptions (#8840) (cb77fd0)
    • AutoModerationRuleManager: Describe cache (#8848) (d275480)
    • Fix message action row components (#8819) (65bc0ad)
    • Specify ActionRowBuilder for components (#8834) (8ed5c1b)
    • Add @extends for select menu classes (#8824) (09f65b7)
    • Make WebSocketShard.lastPingTimestamp public (#8768) (68c9cb3)
    • MessageReplyOptions: Remove duplicate stickers field (#8766) (6e348ff)

    Features

    • Webhook: Add channel property (#8812) (decbce4)
    • Auto Moderation (#7938) (fd4ba5e)
    • SelectMenuInteractions: Add values property (#8805) (b2fabd1)
    • ThreadChannel: Add a helper for pin and unpin (#8786) (e74aa7f)
    • Add Message#bulkDeletable (#8760) (ff85481)
    • New select menus (#8793) (5152abf)
    • InteractionResponses: Add message parameter (#8773) (8b400ca)
    • Support resume urls (#8784) (88cd9d9)
    • Allow deletion of ephemeral messages (#8774) (fc10774)
    • GuildChannelManager: Add .addFollower() method (#8567) (caeb1cb)

    Refactor

    • Embed: Use embedLength function from builders (#8735) (cb3826c)
    Source code(tar.gz)
    Source code(zip)
  • @discordjs/[email protected](Nov 28, 2022)

  • @discordjs/[email protected](Nov 28, 2022)

  • @discordjs/[email protected](Nov 28, 2022)

    Bug Fixes

    • SequentialHandler: Downlevel ECONNRESET errors (#8785) (5a70057)
    • Make ratelimit timeout require event loop to be active (#8779) (68d5712)
    • Pin @types/node version (9d8179c)

    Features

    • Add @discordjs/core (#8736) (2127b32)
    • New select menus (#8793) (5152abf)

    Refactor

    • Update makeURLSearchParams to accept readonly non-Records (#8868) (8376e2d)
    Source code(tar.gz)
    Source code(zip)
  • @discordjs/[email protected](Nov 28, 2022)

  • @discordjs/[email protected](Nov 28, 2022)

  • @discordjs/[email protected](Nov 28, 2022)

  • @discordjs/[email protected](Nov 28, 2022)

  • 14.6.0(Oct 10, 2022)

    Bug Fixes

    • ClientOptions: Make ClientOptions#intents returns an IntentsBitField (#8617) (4c2955a)
    • Correctly construct a builder (#8727) (e548e6a)
    • Components: Error with unknown components (#8724) (6fd331d)
    • Client: Don't auth for webhook fetches with token (#8709) (01d75c8)
    • Re-export util (#8699) (a306219)
    • Throw discord.js errors correctly (#8697) (ace974f)

    Documentation

    • Utils: Remove private from parseEmoji (#8718) (a31e605)
    • Update UserContextMenuCommandInteraction documentation (#8717) (7556db2)
    • Fix AwaitMessageComponentOptions typedef (#8696) (9effd82)

    Features

    • Util: Escape more markdown characters (#8701) (7b8966b)
    • GuildChannelManager: Allow creating channels with a default auto archive duration (#8693) (628759b)
    • Add @discordjs/util (#8591) (b2ec865)
    • ForumChannel: Add defaultSortOrder (#8633) (883f6e9)

    Refactor

    • Rename Error to DiscordjsError internally (#8706) (aec44a0)

    Typings

    • Fix events augmentation (#8681) (ac83ada)
    • Message: Remove & this from #inGuild typeguard (#8704) (c0f7a1a)
    • ModalBuilder: Fix constructor typings (#8690) (2ea2a85)
    Source code(tar.gz)
    Source code(zip)
  • 13.12.0(Oct 10, 2022)

  • @discordjs/[email protected](Oct 10, 2022)

  • @discordjs/[email protected](Oct 8, 2022)

  • @discordjs/[email protected](Oct 8, 2022)

  • @discordjs/[email protected](Oct 8, 2022)

  • @discordjs/[email protected](Oct 8, 2022)

  • @discordjs/[email protected](Oct 8, 2022)

  • @discordjs/[email protected](Oct 8, 2022)

    Bug Fixes

    • Allow adding forums to channelTypes (#8658) (b1e190c)
    • SlashCommandBuilder: Missing methods in subcommand builder (#8583) (1c5b78f)
    • Footer / sidebar / deprecation alert (ba3e0ed)

    Documentation

    • builders/components: Document constructors (#8636) (8444576)
    • Change name (#8604) (dd5a089)
    • Use remarks instead of Note in descriptions (#8597) (f3ce4a7)

    Features

    • Web-components (#8715) (0ac3e76)
    • Add @discordjs/util (#8591) (b2ec865)
    • Add chatInputApplicationCommandMention formatter (#8546) (d08a57c)

    Refactor

    • Replace usage of deprecated ChannelTypes (#8625) (669c3cd)
    • Website components (#8600) (c334157)
    • Use eslint-config-neon for packages. (#8579) (edadb9f)

    Testing

    • Rename incorrect test (#8596) (ce991dd)

    Typings

    • interactions: Fix {Slash,ContextMenu}CommandBuilder#toJSON (#8568) (b7eb96d)
    Source code(tar.gz)
    Source code(zip)
  • 14.5.0(Sep 25, 2022)

    Bug Fixes

    • ThreadChannel: Add forum channel to parent (#8664) (0126d9b)
    • GuildChannelManager: Allow creating webhooks on forums (#8661) (16fcdc3)
    • ForumChannel: Implement missing properties and methods (#8662) (8622939)
    • RepliableInteraction respect cached generic (#8667) (578bc95)
    • ThreadChannel: Allow editing flags (#8671) (1244854)
    • GuildChannelManager: Typo in flags property name when editing (#8669) (fc8ed81)

    Documentation

    • Fix duplicate typedefs (#8677) (d79aa2d)
    • ForumChannel: Add @implements (#8678) (8ca407e)

    Features

    • GuildChannelManager: Allow editing flags (#8637) (abb7226)

    Refactor

    • GuildBanManager: Add deprecation warning for deleteMessageDays (#8659) (e993122)

    Typings

    • GuildChannelManager: Handle forum channel overload (#8660) (1486bc9)
    • Caches: Allow GuildForumThreadManager and GuildTextThreadManager (#8665) (2487e3b)
    Source code(tar.gz)
    Source code(zip)
  • @discordjs/[email protected](Sep 25, 2022)

  • 14.4.0(Sep 21, 2022)

    Bug Fixes

    • Correct applied tags type (#8641) (f6f15d8)
    • ThreadChannel: Make fetchStarterMessage() work in forum posts (#8638) (a7f816e)
    • Update messageCount/totalMessageSent on message events (#8635) (145eb2f)
    • Footer / sidebar / deprecation alert (ba3e0ed)

    Documentation

    • Correctly overwrite setRTCRegion method (#8642) (f049734)
    • GuildTextThreadManager: Document correct @extend (#8639) (802b239)
    • Fix regexps incorrectly being called global (#8624) (fc9653f)
    • Update misleading Client#guildMemberAvailable event description (#8626) (22ac6b4)
    • Options: Update DefaultMakeCacheSettings (#8585) (3252332)
    • Change name (#8604) (dd5a089)

    Features

    • Widget: Allow forum channels (#8645) (b106956)
    • WelcomeChannel: Add forum channel as a type (#8643) (6f1f465)
    • Allow forum channels in webhook update event (#8646) (5048a3d)
    • Add support for guild forums (#7791) (8a8d519)
    • GuildBanManager#create: Add deleteMessageSeconds (#8326) (03fb5b0)
    • Add typeguard to BaseInteraction#isRepliable (#8565) (55c3ee2)
    • Integration: Add scopes (#8483) (8b3d006)
    • Add chatInputApplicationCommandMention formatter (#8546) (d08a57c)

    Refactor

    • Replace usage of deprecated ChannelTypes (#8625) (669c3cd)
    • Split message send/edit types/documentation (#8590) (8e1afae)
    • Website components (#8600) (c334157)

    Typings

    • Narrow channel type in thread managers (#8640) (14bbc91)
    • interactions: Pass Cached type to return type of methods (#8619) (053da5b)
    • Ensure events possess Client<true> (#8612) (a9f003a)
    • GuildChannelManager: Correct fetch return type (#8549) (1d4cdee)
    • ThreadChannel: fetchStarterMessage must return a Message<true> (#8560) (b9c62ac)
    • webhook: Avatar can be null (#8541) (f77612a)
    Source code(tar.gz)
    Source code(zip)
  • 13.11.0(Sep 21, 2022)

    Bug Fixes

    • Fixed TS 4.8 compatibility (#8601) (e6ee7d8)

    Documentation

    • Update misleading Client#guildMemberAvailable event description (v13) (#8627) (fcd52d7)

    Features

    • GuildBanManager: Add deleteMessageSeconds (#8575) (ca68fc3)

    Typings

    • GuildChannelManager: Correct fetch return type (v13) (#8551) (f4e8133)
    Source code(tar.gz)
    Source code(zip)
  • 14.3.0(Aug 22, 2022)

    Bug Fixes

    • GuildMemberManager: add() method throws an error (#8539) (3bef901)
    • Guild: Widget channel types and fixes (#8530) (23a0b6c)
    • Embed: Reference video in video (#8473) (c97977a)

    Documentation

    • GuildAuditLogsEntry: Correct action wording (#8499) (7d25072)

    Features

    • GuildMemberManager: AddRole and removeRole (#8510) (cda3f00)
    • Deprecate ActionRow.from() (#8504) (f9c25dd)
    • WebSocketShard: Support new resume url (#8480) (bc06cc6)

    Refactor

    • GuildAuditLogsEntry: Remove guild from application command permission update extra (#8520) (2b8074d)

    Typings

    • Inference of guild in MessageManager (#8538) (6bb1474)
    • Allow choice's value type to be strictly inferred (#8529) (b3f7c32)
    • GuildAuditLogs: Allow fetching to return all possible values (#8522) (0dba8ad)
    • Correct EventEmitter.on (static) return type (#8524) (16bbc8a)
    • GuildAuditLogs: Remove static Entry (#8521) (7a3d18d)
    • Disallow some channel types from webhook creation (#8531) (4882b17)
    • Implement max/min values for autocomplete (#8498) (812f7f1)
    • ModalMessageModalSubmitInteraction: ChannelId is not nullable (#8496) (c31a5cf)
    • Change type of ApplicationCommandSubCommand.options (#8476) (ebaf158)
    Source code(tar.gz)
    Source code(zip)
  • 13.10.3(Aug 22, 2022)

  • @discordjs/[email protected](Aug 22, 2022)

    Bug Fixes

    • WebSocketShard#destroy: Wait for close and cleanup listeners (#8479) (acdafe6)
    • WebSocketManager#connect: Check if we have enough sessions (#8481) (4fd4252)
    • WebSocketShard: Always reconnect on disconnected with 1000 (#8405) (359f688)
    • WebSocketShard: Emit errors directly instead of objects (#8406) (3161e1a)

    Documentation

    • Fence examples in codeblocks (193b252)

    Features

    • website: Show constructor information (#8540) (e42fd16)
    • website: Render @defaultValue blocks (#8527) (8028813)
    • website: Render tsdoc examples (#8494) (7116647)
    • WebSocketShard: Support new resume url (#8480) (bc06cc6)

    Refactor

    • website: Adjust typography (#8503) (0f83402)
    • Docs design (#8487) (4ab1d09)
    Source code(tar.gz)
    Source code(zip)
Owner
Discord.js
A powerful JavaScript library for interacting with the Discord API
Discord.js
Fun little experiment with Twitter API

Real-time Twitter Header This is a fun little experiment with Twitter API. See my tweet! How to setup for your Twitter Just fill in your information i

Tony Dinh 104 Nov 4, 2022
Notion 3.4k Dec 30, 2022
A simple Discord empty bot.

Discord Level Bot Kurulum İlk olarak bilgisayarına Node JS indir. Daha sonra bir MongoDB hesabı oluştur ve connection linki al. Eğer bunu yapmayı bilm

Theark 21 Jun 8, 2022
A simple Discord chat guard bot.

Discord Chat Guard Bot Kurulum İlk olarak bilgisayarına Node JS indir. Daha sonra bir MongoDB hesabı oluştur ve connection linki al. Eğer bunu yapmayı

Theark 38 Sep 17, 2022
A Discord bot Client Console Website

Discord Bot Client Console A Discord bot Client Console Website made with html , css and js. And Easy Use and easy to run Setup ⚒ Import the Repo by t

Msv 13 Jan 6, 2023
for a Discord

Kurulum Node.JS Cihazınıda Node kurulu olduğuna emin olun. Yeşil Code butonuna basın ve Downland zip seçeneğine tıklayın indirme işlemini bekleyin. İn

Klanter 43 Dec 7, 2022
dscbots.js is a Node.js module that allows you to interact with the Discord API without any complications.

Credits Goodsie - Helping me with the websocketmanager About dscbots.js is a Node.js module that allows you to interact with the Discord API without a

Scarlot Spy 0 Nov 29, 2022
⚡️The Fullstack React Framework — built on Next.js

The Fullstack React Framework "Zero-API" Data Layer — Built on Next.js — Inspired by Ruby on Rails Read the Documentation “Zero-API” data layer lets y

⚡️Blitz 12.5k Jan 4, 2023
An npm package for demonstration purposes using TypeScript to build for both the ECMAScript Module format (i.e. ESM or ES Module) and CommonJS Module format. It can be used in Node.js and browser applications.

An npm package for demonstration purposes using TypeScript to build for both the ECMAScript Module format (i.e. ESM or ES Module) and CommonJS Module format. It can be used in Node.js and browser applications.

Snyk Labs 57 Dec 28, 2022
A package that allows your bot of discord.js v13 & v14 to create the new awesome Discord Modals and interact with them

A package that allows your bot of discord.js v13 & v14 to create the new awesome Discord Modals and interact with them

MateoDeveloper 85 Dec 23, 2022
Complete module to interact with the Brawl Stars API.

BrawlStars-API.js Brawlstars-api.js is a library made to interact with the Official Brawl Stars api, listing all of their endpoints in one place. ✨ Ho

Nícolas Gabriel 4 Nov 3, 2022
A comprehensive collection of useful tools developed with the help of Ethers.js to interact with the Ethereum Blockchain to develop great DeFi apps as quickly and easily as possible.

hudi-packages-ethersfactory How to install Installing with npm For more information on using npm check out the docs here. npm i @humandataincome/ether

HUDI 6 Mar 30, 2022
PublisherConnector is a class object that allows you to interact with the CHILI Publisher editorObject via postMessage without the complexity of postMessage.

PublisherConnector is a class object that allows you to interact with the CHILI Editor editorObject via postMessage without the complexity of postMessage.

CHILI publish 8 Nov 24, 2022
Cindy Dorantes 12 Oct 18, 2022
1KB lightweight, fast & powerful JavaScript templating engine with zero dependencies. Compatible with server-side environments like node.js, module loaders like RequireJS and all web browsers.

JavaScript Templates Contents Demo Description Usage Client-side Server-side Requirements API tmpl() function Templates cache Output encoding Local he

Sebastian Tschan 1.7k Jan 3, 2023
This is a project based on a game Leaderboard. You can interact with an API inserting your user name and score. Built with HTML, CSS, JavaScript and WEBPACK

Leaderboard: Leaderboard project - Microverse Acces link Check the live version here Built With HTML CSS JavaScript VScode Webpack GitFlow Quick view

Vitor Guedes Madeira 11 Oct 8, 2022
A URL Shortener That Allow Users To Interact With Its API Through A Discord Bot

Shortem A URL Shortener That Allow Users To Interact With Its API Through A Discord Bot About Supports Multiple Databases Performant Uses discord.js v

Bots Studios 19 Sep 1, 2022
A secondhand marketplace where you can post items for sale, interact with sellers, save items you are interested in.

Curbside - the secondhand market place that's actually pleasant to use Post items for sale, interact with sellers, save items you are interested in. A

Curbside 14 Sep 9, 2022
On this page, you can save and load all the awesome books you have and save the name and the author into the local storage. this project uses Javascript to interact with the pages

Awesome Books: refactor to use JavaScript classes In this project, We add the links to the applications into the final project Getting Started if you

Cesar Valencia 8 Nov 29, 2022