Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: change token in readme to constant #8688

Merged
merged 4 commits into from Oct 9, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -66,7 +66,7 @@ const commands = [
},
];

const rest = new REST({ version: '10' }).setToken('token');
const rest = new REST({ version: '10' }).setToken(TOKEN);
iCrawl marked this conversation as resolved.
Show resolved Hide resolved

(async () => {
try {
Expand Down Expand Up @@ -99,7 +99,7 @@ client.on('interactionCreate', async (interaction) => {
}
});

client.login('token');
client.login(TOKEN);
```

## Links
Expand Down
4 changes: 2 additions & 2 deletions packages/discord.js/README.md
Expand Up @@ -65,7 +65,7 @@ const commands = [
},
];

const rest = new REST({ version: '10' }).setToken('token');
const rest = new REST({ version: '10' }).setToken(TOKEN);

(async () => {
try {
Expand Down Expand Up @@ -98,7 +98,7 @@ client.on('interactionCreate', async interaction => {
}
});

client.login('token');
client.login(TOKEN);
```

## Links
Expand Down
4 changes: 2 additions & 2 deletions packages/rest/README.md
Expand Up @@ -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), {
Expand All @@ -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), {
Expand Down
2 changes: 1 addition & 1 deletion packages/website/src/util/constants.ts
Expand Up @@ -19,4 +19,4 @@ client.on('interactionCreate', async (interaction) => {
}
});

await client.login('token');`;
await client.login(TOKEN);`;