Skip to content

Commit

Permalink
Additional logging (#18)
Browse files Browse the repository at this point in the history
* begun ignoring channel framework

* messageUpdate only fires when msg changes

* fixed warning message not showing correctly

* begun channel ignoration framework

* fixed bugs

* updated ignoredChannels framework

* updating files

* added ignoredChannels framework

* add ignoredChannel handler to msg event listeners

* fixed file conflicts
  • Loading branch information
aName2050 authored Sep 16, 2023
1 parent baf2220 commit 7d914e0
Show file tree
Hide file tree
Showing 14 changed files with 178 additions and 155 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules
.vscode
config
.env
config/bot.json
11 changes: 11 additions & 0 deletions config/colors.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"EMBED_INVIS_SIDEBAR": "#2B2D31",
"BACKGROUND": "#212529",
"PRIMARY": "#0D6EFD",
"SECONDARY": "#6C757D",
"SUCCESS": "#198754",
"INFO": "#0DCAF0",
"WARNING": "#FFC107",
"DANGER": "#DC3545",
"ERROR": "#B00020"
}
7 changes: 7 additions & 0 deletions config/web.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"PORT": "5000",
"REDIRECTS": {
"local": "http://localhost:5000/login/discord/oauth/redirect",
"production": "https://compacter.gg/login/discord/oauth2/redirect"
}
}
156 changes: 98 additions & 58 deletions package-lock.json

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

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"discord-arts": "^0.4.0",
"discord-html-transcripts": "^3.1.4",
"discord.js": "^14.9.0",
"dotenv": "^16.3.1",
"express": "^4.18.2",
"glob": "^10.2.1",
"mongodb": "^5.5.0",
Expand All @@ -30,6 +31,6 @@
"undici": "^5.20.0"
},
"devDependencies": {
"nodemon": "^2.0.21"
"nodemon": "^3.0.1"
}
}
13 changes: 8 additions & 5 deletions src/bot/Buttons/GuildSettings/refreshSetting.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,10 @@ module.exports = {
};
premium = Settings?.premium ? Settings.premium : 'Free';

let ignoredChannels = JSON.parse(
Settings.IgnoredChannels.Universal
).map(c => `\n* <#${c}>`);
let ignoredChannels = JSON.parse(Settings.IgnoredChannels.Universal)
.map(c => `\n* <#${c}>`)
.join('');


const setting = interaction.message.embeds[0].title;

Expand Down Expand Up @@ -135,7 +136,8 @@ module.exports = {
const channelEditComponents = [actionRow1, actionRow2];
const memberLogEditComponets = [actionRow1, actionRow5, actionRow2];
const premiumManageComponets = [actionRow3];
const universalIgnoredChannels = [actionRow6];
const universalIgnoredChannels = [actionRow6, actionRow2];

const genericComponets = [actionRow4];
let components = [];

Expand Down Expand Up @@ -183,7 +185,8 @@ module.exports = {
.length == 0
? '\n`None`'
: ignoredChannels
}`
}\n\nEdit your list of ignored channels by adding/removing channels`

);
components = universalIgnoredChannels;
}
Expand Down
Loading

0 comments on commit 7d914e0

Please sign in to comment.