mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
Change domain to discord.com (#4160)
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
</p>
|
||||
<br />
|
||||
<p>
|
||||
<a href="https://discord.gg/bRCvFy9"><img src="https://discordapp.com/api/guilds/222078108977594368/embed.png" alt="Discord server" /></a>
|
||||
<a href="https://discord.gg/bRCvFy9"><img src="https://discord.com/api/guilds/222078108977594368/embed.png" alt="Discord server" /></a>
|
||||
<a href="https://www.npmjs.com/package/discord.js"><img src="https://img.shields.io/npm/v/discord.js.svg?maxAge=3600" alt="NPM version" /></a>
|
||||
<a href="https://www.npmjs.com/package/discord.js"><img src="https://img.shields.io/npm/dt/discord.js.svg?maxAge=3600" alt="NPM downloads" /></a>
|
||||
<a href="https://github.com/discordjs/discord.js/actions"><img src="https://github.com/discordjs/discord.js/workflows/Testing/badge.svg" alt="Build status" /></a>
|
||||
@@ -32,7 +32,7 @@
|
||||
## About
|
||||
|
||||
discord.js is a powerful [Node.js](https://nodejs.org) module that allows you to easily interact with the
|
||||
[Discord API](https://discordapp.com/developers/docs/intro).
|
||||
[Discord API](https://discord.com/developers/docs/intro).
|
||||
|
||||
- Object-oriented
|
||||
- Predictable abstractions
|
||||
|
||||
@@ -33,7 +33,7 @@ client.on('message', message => {
|
||||
}
|
||||
});
|
||||
|
||||
// Log our bot in using the token from https://discordapp.com/developers/applications/me
|
||||
// Log our bot in using the token from https://discord.com/developers/applications/me
|
||||
client.login('your token here');
|
||||
```
|
||||
|
||||
@@ -68,7 +68,7 @@ client.on('message', message => {
|
||||
}
|
||||
});
|
||||
|
||||
// Log our bot in using the token from https://discordapp.com/developers/applications/me
|
||||
// Log our bot in using the token from https://discord.com/developers/applications/me
|
||||
client.login('your token here');
|
||||
```
|
||||
|
||||
@@ -105,7 +105,7 @@ client.on('message', message => {
|
||||
}
|
||||
});
|
||||
|
||||
// Log our bot in using the token from https://discordapp.com/developers/applications/me
|
||||
// Log our bot in using the token from https://discord.com/developers/applications/me
|
||||
client.login('your token here');
|
||||
```
|
||||
|
||||
@@ -154,7 +154,7 @@ client.on('message', message => {
|
||||
}
|
||||
});
|
||||
|
||||
// Log our bot in using the token from https://discordapp.com/developers/applications/me
|
||||
// Log our bot in using the token from https://discord.com/developers/applications/me
|
||||
client.login('your token here');
|
||||
```
|
||||
|
||||
|
||||
@@ -27,5 +27,5 @@ client.on('message', message => {
|
||||
}
|
||||
});
|
||||
|
||||
// Log our bot in using the token from https://discordapp.com/developers/applications/me
|
||||
// Log our bot in using the token from https://discord.com/developers/applications/me
|
||||
client.login('your token here');
|
||||
|
||||
@@ -36,5 +36,5 @@ client.on('message', message => {
|
||||
}
|
||||
});
|
||||
|
||||
// Log our bot in using the token from https://discordapp.com/developers/applications/me
|
||||
// Log our bot in using the token from https://discord.com/developers/applications/me
|
||||
client.login('your token here');
|
||||
|
||||
@@ -28,5 +28,5 @@ client.on('guildMemberAdd', member => {
|
||||
channel.send(`Welcome to the server, ${member}`);
|
||||
});
|
||||
|
||||
// Log our bot in using the token from https://discordapp.com/developers/applications/me
|
||||
// Log our bot in using the token from https://discord.com/developers/applications/me
|
||||
client.login('your token here');
|
||||
|
||||
@@ -66,7 +66,7 @@ client.on('message', message => {
|
||||
}
|
||||
});
|
||||
|
||||
// Log our bot in using the token from https://discordapp.com/developers/applications/me
|
||||
// Log our bot in using the token from https://discord.com/developers/applications/me
|
||||
client.login('your token here');
|
||||
```
|
||||
|
||||
@@ -142,7 +142,7 @@ client.on('message', message => {
|
||||
}
|
||||
});
|
||||
|
||||
// Log our bot in using the token from https://discordapp.com/developers/applications/me
|
||||
// Log our bot in using the token from https://discord.com/developers/applications/me
|
||||
client.login('your token here');
|
||||
```
|
||||
|
||||
|
||||
@@ -27,5 +27,5 @@ client.on('message', message => {
|
||||
}
|
||||
});
|
||||
|
||||
// Log our bot in using the token from https://discordapp.com/developers/applications/me
|
||||
// Log our bot in using the token from https://discord.com/developers/applications/me
|
||||
client.login('your token here');
|
||||
|
||||
@@ -8,10 +8,10 @@
|
||||
const Discord = require('discord.js');
|
||||
/*
|
||||
* Create a new webhook
|
||||
* The Webbooks ID and token can be found in the URL, when you request that URL, or in the response body.
|
||||
* https://discordapp.com/api/webhooks/12345678910/T0kEn0fw3Bh00K
|
||||
* ^^^^^^^^^^ ^^^^^^^^^^^^
|
||||
* Webhook ID Webhook Token
|
||||
* The Webhooks ID and token can be found in the URL, when you request that URL, or in the response body.
|
||||
* https://discord.com/api/webhooks/12345678910/T0kEn0fw3Bh00K
|
||||
* ^^^^^^^^^^ ^^^^^^^^^^^^
|
||||
* Webhook ID Webhook Token
|
||||
*/
|
||||
const hook = new Discord.WebhookClient('webhook id', 'webhook token');
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
</p>
|
||||
<br />
|
||||
<p>
|
||||
<a href="https://discord.gg/bRCvFy9"><img src="https://discordapp.com/api/guilds/222078108977594368/embed.png" alt="Discord server" /></a>
|
||||
<a href="https://discord.gg/bRCvFy9"><img src="https://discord.com/api/guilds/222078108977594368/embed.png" alt="Discord server" /></a>
|
||||
<a href="https://www.npmjs.com/package/discord.js"><img src="https://img.shields.io/npm/v/discord.js.svg?maxAge=3600" alt="NPM version" /></a>
|
||||
<a href="https://www.npmjs.com/package/discord.js"><img src="https://img.shields.io/npm/dt/discord.js.svg?maxAge=3600" alt="NPM downloads" /></a>
|
||||
<a href="https://travis-ci.org/discordjs/discord.js"><img src="https://travis-ci.org/discordjs/discord.js.svg" alt="Build status" /></a>
|
||||
@@ -24,7 +24,7 @@ Welcome to the discord.js v12 documentation.
|
||||
## About
|
||||
|
||||
discord.js is a powerful [Node.js](https://nodejs.org) module that allows you to easily interact with the
|
||||
[Discord API](https://discordapp.com/developers/docs/intro).
|
||||
[Discord API](https://discord.com/developers/docs/intro).
|
||||
|
||||
- Object-oriented
|
||||
- Predictable abstractions
|
||||
|
||||
@@ -26,7 +26,7 @@ const UNRESUMABLE_CLOSE_CODES = [1000, 4006, 4007];
|
||||
/**
|
||||
* The WebSocket manager for this client.
|
||||
* <info>This class forwards raw dispatch events,
|
||||
* read more about it here {@link https://discordapp.com/developers/docs/topics/gateway}</info>
|
||||
* read more about it here {@link https://discord.com/developers/docs/topics/gateway}</info>
|
||||
* @extends EventEmitter
|
||||
*/
|
||||
class WebSocketManager extends EventEmitter {
|
||||
|
||||
@@ -631,7 +631,7 @@ class WebSocketShard extends EventEmitter {
|
||||
/**
|
||||
* Adds a packet to the queue to be sent to the gateway.
|
||||
* <warn>If you use this method, make sure you understand that you need to provide
|
||||
* a full [Payload](https://discordapp.com/developers/docs/topics/gateway#commands-and-events-gateway-commands).
|
||||
* a full [Payload](https://discord.com/developers/docs/topics/gateway#commands-and-events-gateway-commands).
|
||||
* Do not use this method if you don't know what you're doing.</warn>
|
||||
* @param {Object} data The full packet to send
|
||||
* @param {boolean} [important=false] If this packet should be added first in queue
|
||||
|
||||
@@ -291,7 +291,7 @@ class Message extends Base {
|
||||
* @readonly
|
||||
*/
|
||||
get url() {
|
||||
return `https://discordapp.com/channels/${this.guild ? this.guild.id : '@me'}/${this.channel.id}/${this.id}`;
|
||||
return `https://discord.com/channels/${this.guild ? this.guild.id : '@me'}/${this.channel.id}/${this.id}`;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -85,7 +85,7 @@ class Webhook {
|
||||
* @property {string} [nonce=''] The nonce for the message
|
||||
* @property {Object[]} [embeds] An array of embeds for the message
|
||||
* @property {MessageMentionOptions} [allowedMentions] Which mentions should be parsed from the message content
|
||||
* (see [here](https://discordapp.com/developers/docs/resources/channel#embed-object) for more details)
|
||||
* (see [here](https://discord.com/developers/docs/resources/channel#embed-object) for more details)
|
||||
* @property {DisableMentionType} [disableMentions=this.client.options.disableMentions] Whether or not all mentions or
|
||||
* everyone/here mentions should be sanitized to prevent unexpected mentions
|
||||
* @property {FileOptions[]|string[]} [files] Files to send with the message
|
||||
|
||||
@@ -57,7 +57,7 @@ class TextBasedChannel {
|
||||
* @property {string} [nonce=''] The nonce for the message
|
||||
* @property {string} [content=''] The content for the message
|
||||
* @property {MessageEmbed|Object} [embed] An embed for the message
|
||||
* (see [here](https://discordapp.com/developers/docs/resources/channel#embed-object) for more details)
|
||||
* (see [here](https://discord.com/developers/docs/resources/channel#embed-object) for more details)
|
||||
* @property {MessageMentionOptions} [allowedMentions] Which mentions should be parsed from the message content
|
||||
* @property {DisableMentionType} [disableMentions=this.client.options.disableMentions] Whether or not all mentions or
|
||||
* everyone/here mentions should be sanitized to prevent unexpected mentions
|
||||
|
||||
@@ -24,7 +24,7 @@ class ActivityFlags extends BitField {}
|
||||
* * `SYNC`
|
||||
* * `PLAY`
|
||||
* @type {Object}
|
||||
* @see {@link https://discordapp.com/developers/docs/topics/gateway#activity-object-activity-flags}
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway#activity-object-activity-flags}
|
||||
*/
|
||||
ActivityFlags.FLAGS = {
|
||||
INSTANCE: 1 << 0,
|
||||
|
||||
@@ -74,13 +74,13 @@ exports.DefaultOptions = {
|
||||
* HTTP options
|
||||
* @typedef {Object} HTTPOptions
|
||||
* @property {number} [version=7] API version to use
|
||||
* @property {string} [api='https://discordapp.com/api'] Base url of the API
|
||||
* @property {string} [api='https://discord.com/api'] Base url of the API
|
||||
* @property {string} [cdn='https://cdn.discordapp.com'] Base url of the CDN
|
||||
* @property {string} [invite='https://discord.gg'] Base url of invites
|
||||
*/
|
||||
http: {
|
||||
version: 7,
|
||||
api: 'https://discordapp.com/api',
|
||||
api: 'https://discord.com/api',
|
||||
cdn: 'https://cdn.discordapp.com',
|
||||
invite: 'https://discord.gg',
|
||||
},
|
||||
|
||||
@@ -41,7 +41,7 @@ class Intents extends BitField {}
|
||||
* * `DIRECT_MESSAGE_REACTIONS`
|
||||
* * `DIRECT_MESSAGE_TYPING`
|
||||
* @type {Object}
|
||||
* @see {@link https://discordapp.com/developers/docs/topics/gateway#list-of-intents}
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway#list-of-intents}
|
||||
*/
|
||||
Intents.FLAGS = {
|
||||
GUILDS: 1 << 0,
|
||||
@@ -64,7 +64,7 @@ Intents.FLAGS = {
|
||||
/**
|
||||
* Bitfield representing all privileged intents
|
||||
* @type {number}
|
||||
* @see {@link https://discordapp.com/developers/docs/topics/gateway#privileged-intents}
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway#privileged-intents}
|
||||
*/
|
||||
Intents.PRIVILEGED = Intents.FLAGS.GUILD_MEMBERS | Intents.FLAGS.GUILD_PRESENCES;
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ class MessageFlags extends BitField {}
|
||||
* * `SOURCE_MESSAGE_DELETED`
|
||||
* * `URGENT`
|
||||
* @type {Object}
|
||||
* @see {@link https://discordapp.com/developers/docs/resources/channel#message-object-message-flags}
|
||||
* @see {@link https://discord.com/developers/docs/resources/channel#message-object-message-flags}
|
||||
*/
|
||||
MessageFlags.FLAGS = {
|
||||
CROSSPOSTED: 1 << 0,
|
||||
|
||||
@@ -80,7 +80,7 @@ class Permissions extends BitField {
|
||||
* * `MANAGE_WEBHOOKS`
|
||||
* * `MANAGE_EMOJIS`
|
||||
* @type {Object}
|
||||
* @see {@link https://discordapp.com/developers/docs/topics/permissions}
|
||||
* @see {@link https://discord.com/developers/docs/topics/permissions}
|
||||
*/
|
||||
Permissions.FLAGS = {
|
||||
CREATE_INSTANT_INVITE: 1 << 0,
|
||||
|
||||
@@ -22,7 +22,7 @@ class Speaking extends BitField {}
|
||||
* * `SOUNDSHARE`
|
||||
* * `PRIORITY_SPEAKING`
|
||||
* @type {Object}
|
||||
* @see {@link https://discordapp.com/developers/docs/topics/voice-connections#speaking}
|
||||
* @see {@link https://discord.com/developers/docs/topics/voice-connections#speaking}
|
||||
*/
|
||||
Speaking.FLAGS = {
|
||||
SPEAKING: 1 << 0,
|
||||
|
||||
@@ -30,7 +30,7 @@ class UserFlags extends BitField {}
|
||||
* * `VERIFIED_BOT`
|
||||
* * `VERIFIED_DEVELOPER`
|
||||
* @type {Object}
|
||||
* @see {@link https://discordapp.com/developers/docs/resources/user#user-object-user-flags}
|
||||
* @see {@link https://discord.com/developers/docs/resources/user#user-object-user-flags}
|
||||
*/
|
||||
UserFlags.FLAGS = {
|
||||
DISCORD_EMPLOYEE: 1 << 0,
|
||||
|
||||
Reference in New Issue
Block a user