Skip to content

Implementation of the Lunch Buddy feature #167

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

Merged
merged 20 commits into from
Jan 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
6237660
update: checking if perms work
mi-mott Feb 7, 2023
d6628a3
Chron job set for every minute, basic embed added and structure for t…
mi-mott Feb 7, 2023
37ac8d6
Updated README
mi-mott Feb 7, 2023
888fbb7
Implemented area voting system
Domin0de Feb 12, 2023
e175de7
Ran linting and prettier for current changes
Domin0de Feb 12, 2023
65f5fb7
Appending location poll for given area, and vote counting for both ar…
Domin0de Feb 25, 2023
492b13c
Implemented functional voting system for area and location, creating …
Domin0de May 15, 2023
faad7d3
Used await and cleaned up a bit of code, thread now adds all voters n…
mi-mott May 27, 2023
1cb8e88
Lint fix
mi-mott May 27, 2023
2a532ad
Removed promises and adjusted placement of vote function calls
Domin0de Aug 25, 2023
cf0f156
Merge branch 'develop' of https://github.com/csesoc/discord-bot into …
Domin0de Aug 25, 2023
9819756
Adjusted thread users, append location vote pings
Domin0de Sep 1, 2023
12d6c03
Linting fixes
Domin0de Sep 1, 2023
9536332
Locations Update
Domin0de Sep 8, 2023
72f9cd1
Adds "any" option and append additional vote info
Domin0de Oct 7, 2023
a415a94
Appended code for live run timing
Domin0de Oct 24, 2023
051144a
Update to use config file
Domin0de Jan 17, 2024
310ccea
Allow disabling of feature without editing code and disable
Domin0de Jan 17, 2024
541b8f5
Minor adjustment to readme and npm commands
Domin0de Jan 21, 2024
3d5a97e
Appended clarifying comment regarding edge case of only any votes
Domin0de Jan 21, 2024
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
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,11 @@
- `DISCORD_TOKEN` with the token of the bot
- `APP_ID` with the ID of the bot application
- Install dependencies with `npm install`
- Register slash commands with `node deploy-commands.js`
- Register slash commands with `npm run deploy` or `node deploy-commands.js`
- Ensure a PostgreSQL database is setup according to "config/database.yml"
- Start the bot with `node index.js`

## Running the bot with Nodemon

- Nodemon has been installed, this addition allows for continuous integration with and hot reloads the bot upon saving.
- Run the bot with Nodemon using `npm run server`
2 changes: 1 addition & 1 deletion config/database.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ user: user
dbname: bot
password: pass
host: 0.0.0.0
port: 40041
port: 40041
6 changes: 6 additions & 0 deletions config/lunch_buddy.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"voteOriginId": "959995388289495050",
"threadDestinationId": "959995388289495050",
"interactionTimeout": 360000,
"cronString": ""
}
2 changes: 1 addition & 1 deletion data/createvc.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"users": [],
"channels": []
}
}
121 changes: 121 additions & 0 deletions data/lunch_buddy_locations.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
const locations = [
{
value: "Upper Campus Food Court",
sub: [
{
name: "Tropical Green Pho",
},
{
name: "Pho House",
},
{
name: "Classic Kebab",
},
{
name: "Chinese Takeaway",
},
{
name: "Tori Sushi",
},
{
name: "Gradu-eat",
},
{
name: "The Little Marionette Cafe",
},
{
name: "Lhaksa Delight",
},
{
name: "Bioscience building Cafe (XS Espresso)",
},
],
},
{
value: "Subway Zone",
sub: [
{
name: "Subway",
},
{
name: "Boost",
},
{
name: "Southern Wok",
},
{
name: "Cafe Brioso",
},
{
name: "Penny Lane",
},
],
},
{
value: "Quadrangle Food Court",
sub: [
{
name: "Soul Origin",
},
{
name: "PappaRich",
},
{
name: "Nene Chicken",
},
{
name: "Plume Cafe",
},
],
},
{
value: "Lower Campus",
sub: [
{
name: "Stellinis Pasta Bar",
},
{
name: "Guzman Y Gomez",
},
{
name: "Mamak Village",
},
{
name: "Yallah Eats Kebab and Shawarma",
},
{
name: "Sharetea",
},
{
name: "Maze Coffee & Food",
},
{
name: "Campus Village Cafe",
},
{
name: "Home Ground Kiosk",
},
],
},
{
value: "J17 Ainsworth",
sub: [
{
name: "Coffee on Campus Cafe",
},
],
},
{
value: "Other Options",
sub: [
{
name: "Sport",
},
{
name: "On Campus Study",
},
],
},
];

exports.locations = locations;
Loading