added settings

This commit is contained in:
DeSqBlocki
2025-02-13 21:04:53 +01:00
parent 5b07182020
commit 85f031c33a
8 changed files with 155 additions and 29 deletions
+3 -3
View File
@@ -3,11 +3,11 @@ module.exports = {
name: 'Command/positivity',
once: false,
async execute(channel, userstate, message, self) {
const db = mClient.db('channels')
const db = mClient.db('commands')
const coll = db.collection(channel)
const command = await coll.findOne({ name: 'positivity' })
// create if not exists
// create in disabled state if not exists
if (!command) {
await coll.insertOne({
name: 'positivity',
@@ -15,7 +15,7 @@ module.exports = {
})
}
if (!command.enabled){ return }
if (!command?.enabled){ return tClient.say(channel, `This command is currently disabled `) }
async function sendPositivity() {
// Function sends a random string of predetermined positivity, Donothon Top Donator Reward