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

Commit

Permalink
Ducks: Added the ducks module (#25)
Browse files Browse the repository at this point in the history
* Ducks: Added the ducks module (woo)

* Ducks: Added ducks to the default config, added a timeout Map

* fix: Cleaned the file up a bit

* fix: Fixed the merge, cleaned ducks up one last bit

* fix: Fixed formatting in the mongo file
  • Loading branch information
Cpt-Dingus authored Nov 7, 2023
1 parent 4b1b919 commit d1151ee
Show file tree
Hide file tree
Showing 5 changed files with 1,139 additions and 2 deletions.
18 changes: 18 additions & 0 deletions config.default.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,24 @@
},
"unwarn": {
"enabled": true

},
"duck": {
"enabled": true,
"channels": [],
// Times are specified in seconds
"minimumSpawn": 30,
"maximumSpawn": 180,
"runAwayTime": 20,
// Timeout on miss
"cooldown": 5,
// Failure percentages
"failRates": {
// Bef and bang
"interaction": 50,
"kill": 50,
"donate": 50
}
}
}
}
1 change: 1 addition & 0 deletions src/core/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {GatewayIntentBits, Client} from 'discord.js';
export const client = new Client({
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildMembers,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.MessageContent,
GatewayIntentBits.GuildPresences,
Expand Down
3 changes: 1 addition & 2 deletions src/core/mongo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@ import {Dependency} from './modules.js';
export const mongo = new Dependency('MongoDB', async () => {
const mongoConfig = botConfig.secrets.mongodb;


let connectionString: string | undefined;
// Allows for empty authentication fields without erroring
// Allows for empty authentication fields without erroring
if (mongoConfig.username === '' || mongoConfig.password === '') {
// https://www.mongodb.com/docs/manual/reference/connection-string/
connectionString =
Expand Down
Loading

0 comments on commit d1151ee

Please sign in to comment.