Skip to content

Commit

Permalink
optional selfoida for all users
Browse files Browse the repository at this point in the history
  • Loading branch information
akargl committed Jan 30, 2021
1 parent 9c6c94e commit ff6d115
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions commands/oida.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const fs = require("fs");
module.exports = {
name: "oida",
description: "Oida a user.",
cooldown: 10 * 60,
cooldown: 60,

execute(message, args, client) {
if (!args.length) {
Expand All @@ -21,7 +21,8 @@ module.exports = {
lookupKey = username.toLowerCase();
}

if (client.settings.userIdsWithSelfOida.includes(message.author.id) &&

if (client.settings.userIdsWithSelfOida && client.settings.userIdsWithSelfOida.includes(message.author.id) &&
Math.random() <= client.settings.selfOidaChance) {
lookupKey = message.author.id;
username = message.author.username;
Expand Down

0 comments on commit ff6d115

Please sign in to comment.