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:
NaeHyeok Jeong 2022-10-10 06:27:46 +09:00 committed by GitHub
parent a31e605e09
commit 0a9d57b011
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 7 deletions

View file

@ -66,7 +66,7 @@ const commands = [
},
];
const rest = new REST({ version: '10' }).setToken('token');
const rest = new REST({ version: '10' }).setToken(TOKEN);
(async () => {
try {
@ -99,7 +99,7 @@ client.on('interactionCreate', async (interaction) => {
}
});
client.login('token');
client.login(TOKEN);
```
## Links

View file

@ -66,7 +66,7 @@ const commands = [
},
];
const rest = new REST({ version: '10' }).setToken('token');
const rest = new REST({ version: '10' }).setToken(TOKEN);
(async () => {
try {
@ -99,7 +99,7 @@ client.on('interactionCreate', async interaction => {
}
});
client.login('token');
client.login(TOKEN);
```
## Links

View file

@ -42,7 +42,7 @@ Send a basic message:
import { REST } from '@discordjs/rest';
import { Routes } from 'discord-api-types/v10';
const rest = new REST({ version: '10' }).setToken('token');
const rest = new REST({ version: '10' }).setToken(TOKEN);
try {
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 { Routes } from 'discord-api-types/v10';
const rest = new REST({ version: '10' }).setToken('token');
const rest = new REST({ version: '10' }).setToken(TOKEN);
try {
await rest.post(Routes.threads(CHANNEL_ID, MESSAGE_ID), {

View file

@ -19,4 +19,4 @@ client.on('interactionCreate', async (interaction) => {
}
});
await client.login('token');`;
await client.login(TOKEN);`;