Skip to content
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

Push fix to COMP6843 missing from course aliases #210

Open
wants to merge 80 commits into
base: projects-bot
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
054128a
migrate from insou api to circles for the handbook commands (#128)
imagine-hussain Feb 22, 2023
ea97f33
prettier formatted
AcdSoftCo Feb 22, 2023
81e5085
chore(deps): update `renovate` config
lhjt Mar 22, 2023
883a0d8
chore(deps): update docker/build-push-action action to v4 (#134)
renovate[bot] Mar 23, 2023
d0656ca
Projects description command feature (#145)
zcDay1 May 16, 2023
9a4c9ec
disable annoying carrotboard pins
abiramen Aug 18, 2023
2f59c71
rolesPermOverride command is a script or one-time use command to atta…
AcdSoftCo Sep 16, 2023
617c373
Revert "rolesPermOverride command is a script or one-time use command…
AcdSoftCo Sep 16, 2023
da9b795
rolesPermOverride command (#152)
zcDay1 Sep 20, 2023
d55e093
Roles perm override (#153)
zcDay1 Sep 24, 2023
b2562be
Project descriptions (#154)
zcDay1 Sep 25, 2023
9f7c78d
Merge branch 'projects-bot' into develop
zcDay1 Sep 26, 2023
65f32ef
Dev/course channel fix 3 (#158)
Bigbugman Oct 21, 2023
7912884
Merge branch 'projects-bot' into develop
zcDay1 Oct 21, 2023
027f8fe
dev/course-channel-fix-5 (#160)
abe123442 Oct 22, 2023
a2cafe4
Merge branch 'projects-bot' into develop
zcDay1 Oct 22, 2023
4bac7ae
Update rolesPermOverride.js
zcDay1 Oct 24, 2023
b9576b5
Course Command Fixing - Collection Null Value Error (#162)
Domin0de Oct 31, 2023
0f34280
Dev/upgrade handbook url (#164)
abe123442 Nov 3, 2023
35f1f3b
Fixed bug for courses that do not yet have an offering term (Default:…
abe123442 Nov 3, 2023
34e2f53
Implementation of the Lunch Buddy feature (#167)
Domin0de Jan 21, 2024
6da7e8e
[DISC-107] Adding csesocLinks to get CSESoc related links (#170)
chlowoee Apr 21, 2024
dc2088f
[DISC-109] Adding bot-status for events and member count (#169)
ericwu2205 May 5, 2024
e4e3aa1
Update dependency nodemailer to v6.9.9 [SECURITY] (#168)
renovate[bot] May 15, 2024
28dad18
Update dependency axios to v0.28.0 [SECURITY] (#166)
renovate[bot] May 15, 2024
e02999a
fix(deps): update dependency yaml to v2.2.2 [security] (#147)
renovate[bot] May 15, 2024
1d16f9d
Update dependency dotenv to v16 (#141)
renovate[bot] May 15, 2024
ed9e422
chore(deps): update actions/checkout action to v4 (#157)
renovate[bot] May 15, 2024
ea0b2f8
fix(deps): update dependency discordjs-button-pagination to v3 (#140)
renovate[bot] May 15, 2024
e9cc79b
Remove unused discord-tictactoe dependency and updated canvas (#173)
Domin0de May 15, 2024
90a3e00
fix(deps): update weekly patch updates (#142)
renovate[bot] May 15, 2024
a1c4112
fix(deps): update dependency @discordjs/builders to v1 (#135)
renovate[bot] May 15, 2024
720e1c6
fix(deps): update dependency discord.js to v14 (#139)
renovate[bot] May 15, 2024
b2c1a88
Update to fix v14 breaking changes (#176)
Domin0de May 15, 2024
05f2dd7
chore(deps): update actions/setup-node action to v4 (#172)
renovate[bot] May 15, 2024
1b1ba66
Nitpick refactor for courses command (#126)
XenocidePC May 25, 2024
14d467c
fix(deps): update dependency mathjs to v12 (#182)
renovate[bot] May 27, 2024
dead83e
fix(deps): update dependency axios to v1 (#181)
renovate[bot] May 27, 2024
31a2eb0
fix(deps): update dependency @discordjs/rest to v2 (#179)
renovate[bot] May 27, 2024
0269b1c
chore(deps): update dependency eslint-config-prettier to v9 (#175)
renovate[bot] May 27, 2024
eeb06f1
fix(deps): update dependency nodemon to v3 (#183)
renovate[bot] May 27, 2024
3848496
chore(deps): update node.js to v20 (#171)
renovate[bot] May 27, 2024
8e1acf4
fix(deps): update dependency mathjs to v13 (#184)
renovate[bot] Jun 5, 2024
0762214
DISC-119-unielectives-review (#188)
h34312575s Jun 16, 2024
a586bb2
[DISC-120] Update eslint dependency and nodejs to v20
renovate[bot] Jun 27, 2024
7bebb5f
[DISC-120] Update to prettier and corresponding eslint plugin
renovate[bot] Jun 27, 2024
ab156e2
chore(deps): lock file maintenance (#186)
renovate[bot] Jun 27, 2024
0478938
chore(deps): update weekly minor updates (#143)
renovate[bot] Jun 27, 2024
84d63f4
[DISC-120] Fix to renovate.json file (#190)
Domin0de Jun 27, 2024
d2ff9ac
[DISC-120] Declare file type for requiring data (#192)
Domin0de Jun 28, 2024
719f36d
[DISC-120] Adjust data type for file (#193)
Domin0de Jun 28, 2024
c7f335f
[DISC-120] Move to using fs for configuration (#194)
Domin0de Jun 28, 2024
56701c8
Move file to config
Domin0de Jun 28, 2024
5fa634f
Fix spelling error
Domin0de Jun 28, 2024
f4b82ae
Append setup command for puppeteer browser
Domin0de Jun 28, 2024
132b068
Downloading dependencies and requirements for puppeteer
Domin0de Jun 29, 2024
da4e542
Modification to installation order
Domin0de Jun 29, 2024
36d43cd
Affirm installation
Domin0de Jun 29, 2024
6e593c8
Revert prior changes and set to use alternate folder for chromium ins…
Domin0de Jul 8, 2024
804c65f
Manually ignore puppeteer config file in eslint
Domin0de Jul 8, 2024
54dc641
Attempt fix to eslint hanging
Domin0de Jul 8, 2024
e65eb61
[DISC-117] Adding travelguides command (#187)
chlowoee Jul 9, 2024
7028f56
Modify location and method for chromium install
Domin0de Jul 9, 2024
ada9f90
Alter setup to use chromium base
Domin0de Jul 9, 2024
d8f9e47
Update to puppeteer version
Domin0de Jul 9, 2024
c651c4c
Replace secondary node image with puppeteer
Domin0de Jul 14, 2024
0c17f44
Fix capitalisation inconsistency and assume permission set
Domin0de Jul 14, 2024
dff8d4b
Reappend entrypoint permission modification
Domin0de Jul 14, 2024
a34fca4
Reset user from image setup
Domin0de Jul 14, 2024
5298768
Attempt return to puppeteer user after setup
Domin0de Jul 17, 2024
eecb1b5
[DISC-110] Adding Course Chats 1-year "Subscription" (#191)
ericwu2205 Jul 17, 2024
8ed55ab
[DISC-121] Implement Logging for User Rejoining (#199)
Domin0de Aug 8, 2024
1f6ff77
Merge branch 'projects-bot' into develop
Domin0de Aug 8, 2024
2f55736
Fix to incorrect conflict resolution commit
Domin0de Aug 8, 2024
fa02763
Minor fixes to Admin Command (#203)
Domin0de Aug 8, 2024
ccb0ff7
Append additional table creation after removing old table
Domin0de Aug 8, 2024
74aa923
Merge branch 'projects-bot' into develop
Domin0de Aug 8, 2024
9ec8cd1
Update dependency axios to v1.7.4 [SECURITY] (#205)
renovate[bot] Oct 30, 2024
1af826e
Fix embed option usage of strings with objects (#207)
Domin0de Nov 12, 2024
3699861
Fix COMP6843 missing from course aliases
Domin0de Dec 4, 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
4 changes: 2 additions & 2 deletions commands/admin-standup.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const { SlashCommandBuilder } = require("@discordjs/builders");
const { EmbedBuilder, ButtonBuilder, Permissions } = require("discord.js");
const { EmbedBuilder, ButtonBuilder, PermissionsBitField } = require("discord.js");
const paginationEmbed = require("discordjs-button-pagination");

module.exports = {
Expand Down Expand Up @@ -28,7 +28,7 @@ module.exports = {
const standupDB = global.standupDBGlobal;
const TEAM_DIRECTOR_ROLE_ID = "921348676692107274";
if (
!interaction.member.permissions.has(Permissions.FLAGS.ADMINISTRATOR) &&
!interaction.member.permissions.has(PermissionsBitField.Flags.Administrator) &&
!interaction.member._roles.includes(TEAM_DIRECTOR_ROLE_ID)
) {
return await interaction.reply({
Expand Down
10 changes: 6 additions & 4 deletions commands/admin.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const { SlashCommandBuilder } = require("@discordjs/builders");
const { Permissions } = require("discord.js");
const { PermissionsBitField } = require("discord.js");

const COMMAND_KICKUNVERIFIED = "kickunverified";
const COMMAND_DROPUSERTABLE = "dropusertable";
Expand All @@ -20,7 +20,7 @@ module.exports = {
),
async execute(interaction) {
try {
if (!interaction.member.permissions.has(Permissions.FLAGS.ADMINISTRATOR)) {
if (!interaction.member.permissions.has(PermissionsBitField.Flags.Administrator)) {
return await interaction.reply({
content: "You do not have permission to execute this command.",
ephemeral: true,
Expand Down Expand Up @@ -63,9 +63,11 @@ module.exports = {
return await interaction.reply("Removed unverified members.");
} else if (interaction.options.getSubcommand() === COMMAND_DROPUSERTABLE) {
const userDB = global.userDB;
await userDB.drop_table();

return await interaction.editReply("Deleted user table.");
await userDB.deleteUsers();
await userDB.create_table_users();

return await interaction.reply("Deleted user table.");
}

return await interaction.reply("Error: unknown subcommand.");
Expand Down
4 changes: 2 additions & 2 deletions commands/anonymouspost.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const { SlashCommandBuilder } = require("@discordjs/builders");
const { allowedChannels } = require("../config/anon_channel.json");
const paginationEmbed = require("discordjs-button-pagination");
const fs = require("fs");
const { Util, EmbedBuilder, ButtonBuilder, Permissions } = require("discord.js");
const { Util, EmbedBuilder, ButtonBuilder, PermissionsBitField } = require("discord.js");
module.exports = {
data: new SlashCommandBuilder()
.setName("anonymouspost")
Expand Down Expand Up @@ -125,7 +125,7 @@ module.exports = {
}

// Admin permission check
if (!interaction.member.permissions.has(Permissions.FLAGS.ADMINISTRATOR)) {
if (!interaction.member.permissions.has(PermissionsBitField.Flags.Administrator)) {
return await interaction.reply({
content: "You do not have permission to execute this command.",
ephemeral: true,
Expand Down
1 change: 1 addition & 0 deletions commands/course.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const COMMAND_LEAVE = "leave";
// map of course aliases to their actual names
const course_aliases = {
comp6841: "comp6441",
comp6843: "comp6443",
comp9044: "comp2041",
comp3891: "comp3231",
comp9201: "comp3231",
Expand Down
4 changes: 2 additions & 2 deletions commands/faqadmin.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// @ts-check
const { SlashCommandBuilder, SlashCommandSubcommandBuilder } = require("@discordjs/builders");
const { Permissions } = require("discord.js");
const { PermissionsBitField } = require("discord.js");

// ////////////////////////////////////////////
// //////// SETTING UP THE COMMANDS ///////////
Expand Down Expand Up @@ -46,7 +46,7 @@ async function handleInteraction(interaction) {
const faqStorage = global.faqStorage;

// Admin permission check (this may not work uhm)
if (!interaction.member.permissions.has(Permissions.FLAGS.ADMINISTRATOR)) {
if (!interaction.member.permissions.has(PermissionsBitField.Flags.Administrator)) {
await interaction.reply({
content: "You do not have permission to execute this command.",
ephemeral: true,
Expand Down
9 changes: 7 additions & 2 deletions commands/handbook.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
const response = await axios.get(`${apiURL}/courses/getCourse/${courseCode}`);
data = response.data;
// console.log(data);
} catch (e) {

Check warning on line 35 in commands/handbook.js

View workflow job for this annotation

GitHub Actions / Format & lint check

'e' is defined but never used
return await interaction.reply({
content: "Invalid course code.",
ephemeral: true,
Expand All @@ -59,7 +59,10 @@
.setTitle(title)
.setURL(`${handbookURL}/${code}`)
.setColor(0x3a76f8)
.setAuthor(`Course Info: ${code} (${UOC} UOC)`, "https://i.imgur.com/EE3Q40V.png")
.setAuthor({
name: `Course Info: ${code} (${UOC} UOC)`,
iconURL: "https://i.imgur.com/EE3Q40V.png",
})
.addFields(
{
name: "Overview",
Expand Down Expand Up @@ -106,7 +109,9 @@
/* }, */
)
.setTimestamp()
.setFooter("Data fetched from Circles' Api");
.setFooter({
text: "Data fetched from Circles' Api",
});
await interaction.reply({ embeds: [courseInfo] });
}
},
Expand Down
4 changes: 2 additions & 2 deletions commands/logreport.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const { SlashCommandBuilder } = require("@discordjs/builders");
const { Permissions } = require("discord.js");
const { PermissionsBitField } = require("discord.js");
const path = require("path");
const nodemailer = require("nodemailer");

Expand Down Expand Up @@ -44,7 +44,7 @@ module.exports = {

async execute(interaction) {
try {
if (!interaction.member.permissions.has(Permissions.FLAGS.ADMINISTRATOR)) {
if (!interaction.member.permissions.has(PermissionsBitField.Flags.Administrator)) {
await interaction.reply({
content: "You do not have permission to execute this command.",
ephemeral: true,
Expand Down
4 changes: 2 additions & 2 deletions commands/reactforrole.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const { SlashCommandBuilder } = require("@discordjs/builders");
const { Permissions, EmbedBuilder } = require("discord.js");
const { PermissionsBitField, EmbedBuilder } = require("discord.js");

module.exports = {
data: new SlashCommandBuilder()
Expand Down Expand Up @@ -27,7 +27,7 @@ module.exports = {

async execute(interaction) {
// Only admin users should be able to execute this command
if (!interaction.member.permissions.has(Permissions.FLAGS.ADMINISTRATOR)) {
if (!interaction.member.permissions.has(PermissionsBitField.Flags.Administrator)) {
return await interaction.reply({
content: "You do not have permission to execute this command.",
ephemeral: true,
Expand Down
4 changes: 2 additions & 2 deletions commands/rolesPermOverride.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const { SlashCommandBuilder } = require("@discordjs/builders");
const { Permissions } = require("discord.js");
const { PermissionsBitField } = require("discord.js");

const is_valid_course_name = (course) => {
const reg_comp_course = /^comp\d{4}$/;
Expand Down Expand Up @@ -136,7 +136,7 @@ module.exports = {
),
async execute(interaction) {
try {
if (!interaction.member.permissions.has(Permissions.FLAGS.ADMINISTRATOR)) {
if (!interaction.member.permissions.has(PermissionsBitField.Flags.Administrator)) {
return await interaction.reply({
content: "You do not have permission to execute this command.",
ephemeral: true,
Expand Down
4 changes: 2 additions & 2 deletions commands/schedulepost.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const { SlashCommandBuilder } = require("@discordjs/builders");
const { EmbedBuilder, Permissions } = require("discord.js");
const { EmbedBuilder, PermissionsBitField } = require("discord.js");

module.exports = {
data: new SlashCommandBuilder()
Expand Down Expand Up @@ -67,7 +67,7 @@

async execute(interaction) {
// Check if user has admin permission
if (!interaction.member.permissions.has(Permissions.FLAGS.ADMINISTRATOR)) {
if (!interaction.member.permissions.has(PermissionsBitField.Flags.Administrator)) {
return await interaction.reply({
content: "You do not have permission to execute this command.",
ephemeral: true,
Expand All @@ -93,7 +93,7 @@
let message;
try {
message = await interaction.channel.messages.fetch(msg_id);
} catch (err) {

Check warning on line 96 in commands/schedulepost.js

View workflow job for this annotation

GitHub Actions / Format & lint check

'err' is defined but never used
return await interaction.reply({
content: "Invalid message ID",
ephemeral: true,
Expand Down
1 change: 0 additions & 1 deletion events/travelguide_ready.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// @ts-check
const { DBTravelguide } = require("../lib/database/dbtravelguide");
/* eslint-disable */

module.exports = {
name: "ready",
Expand Down
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading