mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-18 12:33:30 +01:00
chore: change token in readme to constant (#8688)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
@@ -66,7 +66,7 @@ const commands = [
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
const rest = new REST({ version: '10' }).setToken('token');
|
const rest = new REST({ version: '10' }).setToken(TOKEN);
|
||||||
|
|
||||||
(async () => {
|
(async () => {
|
||||||
try {
|
try {
|
||||||
@@ -99,7 +99,7 @@ client.on('interactionCreate', async (interaction) => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
client.login('token');
|
client.login(TOKEN);
|
||||||
```
|
```
|
||||||
|
|
||||||
## Links
|
## Links
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ const commands = [
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
const rest = new REST({ version: '10' }).setToken('token');
|
const rest = new REST({ version: '10' }).setToken(TOKEN);
|
||||||
|
|
||||||
(async () => {
|
(async () => {
|
||||||
try {
|
try {
|
||||||
@@ -99,7 +99,7 @@ client.on('interactionCreate', async interaction => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
client.login('token');
|
client.login(TOKEN);
|
||||||
```
|
```
|
||||||
|
|
||||||
## Links
|
## Links
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ Send a basic message:
|
|||||||
import { REST } from '@discordjs/rest';
|
import { REST } from '@discordjs/rest';
|
||||||
import { Routes } from 'discord-api-types/v10';
|
import { Routes } from 'discord-api-types/v10';
|
||||||
|
|
||||||
const rest = new REST({ version: '10' }).setToken('token');
|
const rest = new REST({ version: '10' }).setToken(TOKEN);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await rest.post(Routes.channelMessages(CHANNEL_ID), {
|
await rest.post(Routes.channelMessages(CHANNEL_ID), {
|
||||||
@@ -61,7 +61,7 @@ Create a thread from an existing message to be archived after 60 minutes of inac
|
|||||||
import { REST } from '@discordjs/rest';
|
import { REST } from '@discordjs/rest';
|
||||||
import { Routes } from 'discord-api-types/v10';
|
import { Routes } from 'discord-api-types/v10';
|
||||||
|
|
||||||
const rest = new REST({ version: '10' }).setToken('token');
|
const rest = new REST({ version: '10' }).setToken(TOKEN);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await rest.post(Routes.threads(CHANNEL_ID, MESSAGE_ID), {
|
await rest.post(Routes.threads(CHANNEL_ID, MESSAGE_ID), {
|
||||||
|
|||||||
@@ -19,4 +19,4 @@ client.on('interactionCreate', async (interaction) => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
await client.login('token');`;
|
await client.login(TOKEN);`;
|
||||||
|
|||||||
Reference in New Issue
Block a user