Skip to content
This repository has been archived by the owner on Mar 28, 2024. It is now read-only.

Getting it working #144

Open
wants to merge 40 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
30004c2
Started Working
elijahd123 Dec 26, 2022
b8b2434
Started Working 2
elijahd123 Dec 26, 2022
59d9f04
Merge branch 'main' of https://github.com/elijahd123/Trivia-Bot
elijahd123 Jan 9, 2023
ed1d973
Getting it working
alanschapira Jan 16, 2023
c0df533
Got a bit more working
alanschapira Jan 16, 2023
ab5deea
More progress
alanschapira Jan 30, 2023
f50358f
Made progress
alanschapira Feb 6, 2023
df28d2a
Cleaned up bugs and finished. More refactoring needed
alanschapira Feb 13, 2023
6445b00
A bit more formatting
alanschapira Feb 20, 2023
438d058
Better name
alanschapira Feb 20, 2023
32c8589
Updated
alanschapira Feb 20, 2023
f44042d
Cleaning up a bit
alanschapira Feb 21, 2023
63463a5
Made progress on mccompetitive
alanschapira Feb 27, 2023
ccaf0d0
tfchill done (couldn't test)
elijahd123 Feb 27, 2023
a95e2ac
fixed API and tfchill
elijahd123 Mar 13, 2023
e0dfd93
made constants file
elijahd123 Mar 13, 2023
9ae0f8c
Got mc competitive working
alanschapira Mar 20, 2023
eb6ba7b
Added tf competitive
alanschapira Mar 20, 2023
01f4620
refactored files and deleted unnecessary files
elijahd123 Mar 20, 2023
eaef249
refactor 2
elijahd123 Mar 20, 2023
df60d5c
Formatted
alanschapira Apr 14, 2023
a67be19
Removed notes
alanschapira Apr 14, 2023
c9f1417
Fixed conflicts
alanschapira Apr 14, 2023
29c627a
update discord.js version
elenirotsides May 27, 2023
98c52a4
Merge branch 'main' into getting-it-working
elenirotsides May 27, 2023
926448e
format
elenirotsides May 27, 2023
1f81e23
spelling fixes
elenirotsides May 27, 2023
27530b2
add eslint ignore next line
elenirotsides May 27, 2023
a4611ca
change question length constant
elenirotsides May 27, 2023
d61dccb
remove old comment
elenirotsides May 27, 2023
b5512c8
add codefactor readme sticker
elenirotsides May 27, 2023
76f8c56
update print width in prettierrc
elenirotsides May 27, 2023
fa679f9
fix naming mistakes
elenirotsides May 27, 2023
39faeb9
add help slash command and edit command descriptions
elenirotsides May 27, 2023
554cbbb
change followUp response to embed and other fixes
elenirotsides May 28, 2023
68c6204
simplify code that was overengineered
elenirotsides May 28, 2023
5b2d689
remove packages that are no longer needed
elenirotsides May 28, 2023
f6c4c5a
edit Dockerfile
elenirotsides May 28, 2023
85d8ed8
remove comments
elenirotsides May 28, 2023
7a69dec
add more intents and setActivity in ready event
elenirotsides Jun 4, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# flyctl launch added from .gitignore
**/.DS_Store
**/.vscode
**/node_modules
**/.env
**/*icloud
fly.toml
18 changes: 18 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
module.exports = {
env: {
es2021: true,
},
extends: ['airbnb-base', 'prettier'],
overrides: [],
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
},
rules: {
'import/prefer-default-export': 0,
'no-restricted-syntax': 0,
'no-plusplus': 0,
'import/extensions': 0,
'no-console': 0,
},
};
19 changes: 19 additions & 0 deletions .github/workflows/fly-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Deploy to Fly.io
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Fly CLI
uses: superfly/flyctl-actions/setup-flyctl@master

- name: Deploy app to Fly.io
run: flyctl deploy --app trivia-bot --remote-only
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
18.14.1
19 changes: 16 additions & 3 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,20 @@
{
"trailingComma": "es5",
"tabWidth": 4,
"arrowParens": "always",
"bracketSameLine": false,
"bracketSpacing": true,
"embeddedLanguageFormatting": "auto",
"htmlWhitespaceSensitivity": "css",
"insertPragma": false,
"jsxSingleQuote": false,
"printWidth": 80,
"proseWrap": "preserve",
"quoteProps": "as-needed",
"requirePragma": false,
"semi": true,
"singleAttributePerLine": false,
"singleQuote": true,
"printWidth": 130
"tabWidth": 4,
"trailingComma": "es5",
"useTabs": false,
"vueIndentScriptAndStyle": false
}
24 changes: 24 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Start image with a node base image
FROM node:18-alpine

# Create an application directory
RUN mkdir -p /app

# Set the /app directory as the working directory for any command that follows
WORKDIR /app

# Copy the local app package and package-lock.json file to the container
COPY package*.json ./

# Copy local directories to the working directory of the docker image (/app)
COPY ./src ./src

# Install node packages
RUN npm install

# TODO: recursively delete node_modules once babel-node is no longer necessary
# \
# && rm -fr node_modules

# Start the app
CMD ["npm", "run", "start"]
1 change: 0 additions & 1 deletion Procfile

This file was deleted.

3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@

</div>

# Trivia Bot is currently offline
> I am working on fixing this, please be patient with me as I explore new deployment providers. (The provider I was using before will no longer be an option, so I need to find a new company to use.) I am so sorry for the inconvenience!

## What is Trivia Bot?

Trivia Bot is a fun, fully functional, and verified Discord bot that serves the purpose of satisfying your Trivia craving! There are many different modes of Trivia that you can play, either by yourself or with others in your Discord Server. The bot uses the Open Trivia Database API for the trivia questions that are used in the game, so shout out to them for the really cool API! You can find out more about that [here](https://opentdb.com/).
Expand Down
3 changes: 0 additions & 3 deletions babel.config.json

This file was deleted.

26 changes: 26 additions & 0 deletions fly.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# fly.toml file generated for trivia-bot on 2023-04-12T22:14:30-04:00

app = "trivia-bot"
kill_signal = "SIGINT"
kill_timeout = 5
mounts = []
primary_region = "ewr"
processes = []

[[services]]
internal_port = 8080
processes = ["app"]
protocol = "tcp"
[services.concurrency]
hard_limit = 25
soft_limit = 20
type = "connections"

[[services.ports]]
force_https = true
handlers = ["http"]
port = 80

[[services.ports]]
handlers = ["tls", "http"]
port = 443
Loading