added settings
This commit is contained in:
@@ -5,11 +5,11 @@ module.exports = {
|
||||
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: 'donate' })
|
||||
|
||||
// create if not exists
|
||||
// create in disabled state if not exists
|
||||
if (!command) {
|
||||
await coll.insertOne({
|
||||
name: 'donate',
|
||||
@@ -17,7 +17,7 @@ module.exports = {
|
||||
})
|
||||
}
|
||||
|
||||
if (!command.enabled){ return }
|
||||
if (!command?.enabled){ return tClient.say(channel, `This command is currently disabled `)}
|
||||
|
||||
async function sendDonationAd() {
|
||||
// Function to send static donate ad
|
||||
|
||||
Reference in New Issue
Block a user