|
1 |
| -import dotenv from "dotenv"; |
2 |
| -import { REST } from "@discordjs/rest"; |
3 |
| -import { Routes } from "discord-api-types/v10"; |
| 1 | +// import dotenv from "dotenv"; |
| 2 | +// import { REST } from "@discordjs/rest"; |
| 3 | +// import { Routes } from "discord-api-types/v10"; |
4 | 4 |
|
5 |
| -dotenv.config(); |
6 |
| -dotenv.config({ path: ".env.prod" }); |
| 5 | +// dotenv.config(); |
| 6 | +// dotenv.config({ path: ".env.prod" }); |
7 | 7 |
|
8 |
| -if (!process.env.DISCORD_TOKEN) { |
9 |
| - console.error("DISCORD_TOKEN environment variable is not set."); |
10 |
| - process.exit(1); |
11 |
| -} |
| 8 | +// if (!process.env.DISCORD_TOKEN) { |
| 9 | +// console.error("DISCORD_TOKEN environment variable is not set."); |
| 10 | +// process.exit(1); |
| 11 | +// } |
12 | 12 |
|
13 |
| -if (!process.env.DISCORD_CLIENT_ID) { |
14 |
| - console.error("DISCORD_CLIENT_ID environment variable is not set."); |
15 |
| - process.exit(1); |
16 |
| -} |
| 13 | +// if (!process.env.DISCORD_CLIENT_ID) { |
| 14 | +// console.error("DISCORD_CLIENT_ID environment variable is not set."); |
| 15 | +// process.exit(1); |
| 16 | +// } |
17 | 17 |
|
18 |
| -const rest = new REST().setToken(process.env.DISCORD_TOKEN!); |
| 18 | +// const rest = new REST().setToken(process.env.DISCORD_TOKEN!); |
19 | 19 |
|
20 |
| -// for guild-based commands |
| 20 | +// // for guild-based commands |
| 21 | +// // rest |
| 22 | +// // .delete( |
| 23 | +// // Routes.applicationGuildCommand( |
| 24 | +// // process.env.DISCORD_CLIENT_ID!, |
| 25 | +// // process.env.DISCORD_GUILD_ID!, |
| 26 | +// // "1157365753314553900" |
| 27 | +// // ) |
| 28 | +// // ) |
| 29 | +// // .then(() => console.log("Successfully deleted guild command")) |
| 30 | +// // .catch(console.error); |
| 31 | + |
| 32 | +// // for global commands |
21 | 33 | // rest
|
22 |
| -// .delete( |
23 |
| -// Routes.applicationGuildCommand( |
24 |
| -// process.env.DISCORD_CLIENT_ID!, |
25 |
| -// process.env.DISCORD_GUILD_ID!, |
26 |
| -// "1157365753314553900" |
27 |
| -// ) |
28 |
| -// ) |
29 |
| -// .then(() => console.log("Successfully deleted guild command")) |
| 34 | +// .delete(Routes.applicationCommand(process.env.DISCORD_CLIENT_ID, "commandId")) |
| 35 | +// .then(() => console.log("Successfully deleted global command")) |
30 | 36 | // .catch(console.error);
|
31 |
| - |
32 |
| -// for global commands |
33 |
| -rest |
34 |
| - .delete(Routes.applicationCommand(process.env.DISCORD_CLIENT_ID, "commandId")) |
35 |
| - .then(() => console.log("Successfully deleted global command")) |
36 |
| - .catch(console.error); |
0 commit comments