Skip to content

Commit

Permalink
Fixed gitignore
Browse files Browse the repository at this point in the history
  • Loading branch information
coinmoles committed Nov 20, 2023
1 parent e1f6cd2 commit 0a4bff3
Show file tree
Hide file tree
Showing 15 changed files with 419 additions and 10 deletions.
401 changes: 400 additions & 1 deletion .gitignore

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Empty file.
Binary file removed .vs/PromotionBot/v17/.suo
Binary file not shown.
12 changes: 12 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM node:18

MAINTAINER Jiho Park <[email protected]>

RUN mkdir -p /app
WORKDIR /app
ADD . /app

ENV NODE_ENV production

RUN npm install
RUN npm run build
Empty file.
2 changes: 0 additions & 2 deletions obj/Debug/PromotionBot.esproj.FileListAbsolute.txt

This file was deleted.

Empty file.
4 changes: 2 additions & 2 deletions src/commands/registerCommands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import { Client, REST, Routes } from "discord.js";
import { commands } from "./commands.js";

export const registerCommands = async (client: Client) => {
const rest = new REST().setToken(process.env.PROMOTIONBOT_TOKEN!);
const rest = new REST().setToken(process.env.TOKEN!);

try {
await rest.put(
Routes.applicationCommands(process.env.PROMOTIONBOT_CLIENT_ID!),
Routes.applicationCommands(process.env.CLIENT_ID!),
{
body: commands.map(command => command.builder)
}
Expand Down
2 changes: 1 addition & 1 deletion src/commands/utils/checks/checkGuild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { ReplyComponents } from "../../../interfaces/ReplyComponents.js"
import { notInGuildEmbed } from "../errorEmbeds.js"

export const checkGuild = async (interaction: ChatInputCommandInteraction, components?: ReplyComponents[]): Promise<boolean> => {
if (interaction.guild === null || interaction.guild.id !== process.env.PROMOTIONBOT_GUILD_ID) {
if (interaction.guild === null || interaction.guild.id !== process.env.GUILD_ID) {
await interaction.reply({ embeds: [notInGuildEmbed], components })
return false
}
Expand Down
6 changes: 3 additions & 3 deletions src/db/firebase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { getFirestore } from "firebase-admin/firestore"

initializeApp({
credential: cert({
projectId: process.env.PROMOTIONBOT_PROJECT_ID,
clientEmail: process.env.PROMOTIONBOT_TOKEN,
privateKey: process.env.PROMOTIONBOT_PRIVATE_KEY
projectId: process.env.PROJECT_ID,
clientEmail: process.env.CLIENT_EMAIL,
privateKey: process.env.PRIVATE_KEY
})
})

Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ const intents: IntentsBitField = new IntentsBitField()
await registerEvents(client)
await registerCommands(client)

await client.login(process.env.PROMOTIONBOT_TOKEN)
await client.login(process.env.TOKEN)
})()

0 comments on commit 0a4bff3

Please sign in to comment.