mirror of
https://github.com/discordjs/discord.js.git
synced 2024-08-20 18:24:42 +12: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:
parent
a31e605e09
commit
0a9d57b011
4 changed files with 7 additions and 7 deletions
|
@ -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);`;
|
||||||
|
|
Loading…
Reference in a new issue