chore: change start method
This commit is contained in:
parent
98f73591d1
commit
5cc110420b
|
@ -10,4 +10,4 @@ COPY src /app/src
|
|||
|
||||
RUN npm i
|
||||
|
||||
CMD ["npm", "run", "run"]
|
||||
CMD ["npm", "run", "start"]
|
|
@ -1,7 +1,6 @@
|
|||
{
|
||||
"scripts": {
|
||||
"run": "tsx src/index.ts",
|
||||
"register": "tsx src/index.ts --register"
|
||||
"start": "tsx src/index.ts"
|
||||
},
|
||||
"type": "module",
|
||||
"dependencies": {
|
||||
|
|
23
src/index.ts
23
src/index.ts
|
@ -7,18 +7,6 @@ if (!TOKEN || !CLIENT_ID) {
|
|||
}
|
||||
import commands from "./commands.ts";
|
||||
|
||||
if (process.argv.includes("--register")) {
|
||||
const rest = new REST({ version: "10" }).setToken(TOKEN);
|
||||
try {
|
||||
console.log("refreshing slash commands...");
|
||||
await rest.put(Routes.applicationCommands(CLIENT_ID), { body: commands });
|
||||
console.log("OK");
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
process.exit();
|
||||
}
|
||||
|
||||
import {
|
||||
REST,
|
||||
Routes,
|
||||
|
@ -28,6 +16,17 @@ import {
|
|||
Events,
|
||||
TextChannel,
|
||||
} from "discord.js";
|
||||
|
||||
const rest = new REST({ version: "10" }).setToken(TOKEN);
|
||||
try {
|
||||
console.log("refreshing slash commands...");
|
||||
await rest.put(Routes.applicationCommands(CLIENT_ID), { body: commands });
|
||||
console.log("OK");
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
process.exit();
|
||||
|
||||
import { writeConfig, readConfig } from "./config.ts";
|
||||
const client = new Client({
|
||||
intents: [
|
||||
|
|
Loading…
Reference in New Issue
Block a user