Skip to content

Commit

Permalink
(update): Version 4.0.3 update (#70)
Browse files Browse the repository at this point in the history
* (update): reduce profile cooldown to 8s

* (chore): add comments to env sample

* (update): rewrite tip command

* (fix): fix embed err + add flags

* (fix): typo

* (fix): bonus credits for unregistered users

* (feat): add game command

* (feat): add game/captcha category

* (feat): add game/hangman category

* (feat): add game/typingquiz category

* (feat): add game/logoquiz category

* (feat): add game/country-flags category

* (fix): add required permissions

* (update): remove 'games' from path
  • Loading branch information
maisans-maid authored Jan 7, 2021
1 parent 9c935d0 commit 8da880a
Show file tree
Hide file tree
Showing 19 changed files with 915 additions and 52 deletions.
34 changes: 28 additions & 6 deletions .env_example
Original file line number Diff line number Diff line change
@@ -1,7 +1,29 @@
DISCORD_TOKEN= <required>
MONGO= <optional>
DBL_AUTH= <optional>
TOP_GG_AUTH= <optional>
chatbot_id= <optional>
chatbot_key= <optional>
# Remove unused keys below

# Do not add spaces after the equal sign on the actual keys
# Example
# DISCORD_TOKEN=TOKEN.GOES.HERE

# The Discord Bot Token, get one at https://discord.com/developers/applications
# [REQUIRED]
DISCORD_TOKEN=

# The Mongo Password, if you want to use the database-reliant features
# [OPTIONAL]
MONGO=

# Discordbotlist Auth Key, if the bot is listed on dbl.
# Used for posting server and user count
# [OPTIONAL]
DBL_AUTH=

# Top GG Auth Key, if the bot is listed on top.gg
# Used for posting server and user count
# [OPTIONAL]
TOP_GG_AUTH=

# Chatbot id and key, if you want to use the chatbot feature
# contact Sakurajimai#6742 for more info
# [OPTIONAL]
chatbot_id=
chatbot_key=
Binary file added assets/fonts/captcha.ttf
Binary file not shown.
Binary file added assets/fonts/handwriting.ttf
Binary file not shown.
Binary file added assets/images/30-sec-timer.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
255 changes: 255 additions & 0 deletions assets/json/flags.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,255 @@
{
"AD": "Andorra",
"AE": "United Arab Emirates",
"AF": "Afghanistan",
"AG": "Antigua and Barbuda",
"AI": "Anguilla",
"AL": "Albania",
"AM": "Armenia",
"AN": "Netherlands Antilles",
"AO": "Angola",
"AQ": "Antarctica",
"AR": "Argentina",
"AS": "American Samoa",
"AT": "Austria",
"AU": "Australia",
"AW": "Aruba",
"AZ": "Azerbaijan",
"BA": "Bosnia and Herzegovina",
"BB": "Barbados",
"BD": "Bangladesh",
"BE": "Belgium",
"BF": "Burkina Faso",
"BG": "Bulgaria",
"BH": "Bahrain",
"BI": "Burundi",
"BJ": "Benin",
"BL": "Saint Barthélemy",
"BM": "Bermuda",
"BN": "Brunei Darussalam",
"BO": "Bolivia, Plurinational State of",
"BQ": "Caribbean Netherlands",
"BR": "Brazil",
"BS": "Bahamas",
"BT": "Bhutan",
"BV": "Bouvet Island",
"BW": "Botswana",
"BY": "Belarus",
"BZ": "Belize",
"CA": "Canada",
"CC": "Cocos (Keeling) Islands",
"CD": "Congo, the Democratic Republic of the",
"CF": "Central African Republic",
"CG": "Congo",
"CH": "Switzerland",
"CK": "Cook Islands",
"CL": "Chile",
"CM": "Cameroon",
"CN": "China",
"CO": "Colombia",
"CR": "Costa Rica",
"CU": "Cuba",
"CV": "Cape Verde",
"CX": "Christmas Island",
"CY": "Cyprus",
"CZ": "Czech Republic",
"DE": "Germany",
"DJ": "Djibouti",
"DK": "Denmark",
"DM": "Dominica",
"DO": "Dominican Republic",
"DZ": "Algeria",
"EC": "Ecuador",
"EE": "Estonia",
"EG": "Egypt",
"EH": "Western Sahara",
"ER": "Eritrea",
"ES": "Spain",
"ET": "Ethiopia",
"EU": "Europe",
"FI": "Finland",
"FJ": "Fiji",
"FK": "Falkland Islands (Malvinas)",
"FM": "Micronesia, Federated States of",
"FO": "Faroe Islands",
"FR": "France",
"GA": "Gabon",
"GB-ENG": "England",
"GB-NIR": "Northern Ireland",
"GB-SCT": "Scotland",
"GB-WLS": "Wales",
"GB": "United Kingdom",
"GD": "Grenada",
"GE": "Georgia",
"GF": "French Guiana",
"GG": "Guernsey",
"GH": "Ghana",
"GI": "Gibraltar",
"GL": "Greenland",
"GM": "Gambia",
"GN": "Guinea",
"GP": "Guadeloupe",
"GQ": "Equatorial Guinea",
"GR": "Greece",
"GS": "South Georgia and the South Sandwich Islands",
"GT": "Guatemala",
"GU": "Guam",
"GW": "Guinea-Bissau",
"GY": "Guyana",
"HK": "Hong Kong",
"HM": "Heard Island and McDonald Islands",
"HN": "Honduras",
"HR": "Croatia",
"HT": "Haiti",
"HU": "Hungary",
"ID": "Indonesia",
"IE": "Ireland",
"IL": "Israel",
"IM": "Isle of Man",
"IN": "India",
"IO": "British Indian Ocean Territory",
"IQ": "Iraq",
"IR": "Iran, Islamic Republic of",
"IS": "Iceland",
"IT": "Italy",
"JE": "Jersey",
"JM": "Jamaica",
"JO": "Jordan",
"JP": "Japan",
"KE": "Kenya",
"KG": "Kyrgyzstan",
"KH": "Cambodia",
"KI": "Kiribati",
"KM": "Comoros",
"KN": "Saint Kitts and Nevis",
"KP": "Korea, Democratic People's Republic of",
"KR": "Korea, Republic of",
"KW": "Kuwait",
"KY": "Cayman Islands",
"KZ": "Kazakhstan",
"LA": "Lao People's Democratic Republic",
"LB": "Lebanon",
"LC": "Saint Lucia",
"LI": "Liechtenstein",
"LK": "Sri Lanka",
"LR": "Liberia",
"LS": "Lesotho",
"LT": "Lithuania",
"LU": "Luxembourg",
"LV": "Latvia",
"LY": "Libya",
"MA": "Morocco",
"MC": "Monaco",
"MD": "Moldova, Republic of",
"ME": "Montenegro",
"MF": "Saint Martin",
"MG": "Madagascar",
"MH": "Marshall Islands",
"MK": "Macedonia, the former Yugoslav Republic of",
"ML": "Mali",
"MM": "Myanmar",
"MN": "Mongolia",
"MO": "Macao",
"MP": "Northern Mariana Islands",
"MQ": "Martinique",
"MR": "Mauritania",
"MS": "Montserrat",
"MT": "Malta",
"MU": "Mauritius",
"MV": "Maldives",
"MW": "Malawi",
"MX": "Mexico",
"MY": "Malaysia",
"MZ": "Mozambique",
"NA": "Namibia",
"NC": "New Caledonia",
"NE": "Niger",
"NF": "Norfolk Island",
"NG": "Nigeria",
"NI": "Nicaragua",
"NL": "Netherlands",
"NO": "Norway",
"NP": "Nepal",
"NR": "Nauru",
"NU": "Niue",
"NZ": "New Zealand",
"OM": "Oman",
"PA": "Panama",
"PE": "Peru",
"PF": "French Polynesia",
"PG": "Papua New Guinea",
"PH": "Philippines",
"PK": "Pakistan",
"PL": "Poland",
"PM": "Saint Pierre and Miquelon",
"PN": "Pitcairn",
"PR": "Puerto Rico",
"PS": "Palestine",
"PT": "Portugal",
"PW": "Palau",
"PY": "Paraguay",
"QA": "Qatar",
"RE": "Réunion",
"RO": "Romania",
"RS": "Serbia",
"RU": "Russian Federation",
"RW": "Rwanda",
"SA": "Saudi Arabia",
"SB": "Solomon Islands",
"SC": "Seychelles",
"SD": "Sudan",
"SE": "Sweden",
"SG": "Singapore",
"SH": "Saint Helena, Ascension and Tristan da Cunha",
"SI": "Slovenia",
"SJ": "Svalbard and Jan Mayen Islands",
"SK": "Slovakia",
"SL": "Sierra Leone",
"SM": "San Marino",
"SN": "Senegal",
"SO": "Somalia",
"SR": "Suriname",
"SS": "South Sudan",
"ST": "Sao Tome and Principe",
"SV": "El Salvador",
"SX": "Sint Maarten (Dutch part)",
"SY": "Syrian Arab Republic",
"SZ": "Swaziland",
"TC": "Turks and Caicos Islands",
"TD": "Chad",
"TF": "French Southern Territories",
"TG": "Togo",
"TH": "Thailand",
"TJ": "Tajikistan",
"TK": "Tokelau",
"TL": "Timor-Leste",
"TM": "Turkmenistan",
"TN": "Tunisia",
"TO": "Tonga",
"TR": "Turkey",
"TT": "Trinidad and Tobago",
"TV": "Tuvalu",
"TW": "Taiwan",
"TZ": "Tanzania, United Republic of",
"UA": "Ukraine",
"UG": "Uganda",
"UM": "US Minor Outlying Islands",
"US": "United States",
"UY": "Uruguay",
"UZ": "Uzbekistan",
"VA": "Holy See (Vatican City State)",
"VC": "Saint Vincent and the Grenadines",
"VE": "Venezuela, Bolivarian Republic of",
"VG": "Virgin Islands, British",
"VI": "Virgin Islands, U.S.",
"VN": "Viet Nam",
"VU": "Vanuatu",
"WF": "Wallis and Futuna Islands",
"XK": "Kosovo",
"WS": "Samoa",
"YE": "Yemen",
"YT": "Mayotte",
"ZA": "South Africa",
"ZM": "Zambia",
"ZW": "Zimbabwe"
}
1 change: 1 addition & 0 deletions assets/json/logoquiz.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[{"name":"Adidas","url":"https://i.imgur.com/UYy6Yji.png"},{"name":"ADT","url":"https://i.imgur.com/gy0MtQJ.png"},{"name":"Airbnb","url":"https://i.imgur.com/i31gD4C.png"},{"name":"Amazon","url":"https://i.imgur.com/k534ZSd.png"},{"name":"AMD","url":"https://i.imgur.com/nDzQdlM.png"},{"name":"Anker","url":"https://i.imgur.com/KAiWp0C.png"},{"name":"Apple","url":"https://i.imgur.com/hgJ3Fc6.png"},{"name":"Asos","url":"https://i.imgur.com/9VAlLFJ.png"},{"name":"Atari","url":"https://i.imgur.com/1Rr5XWQ.png"},{"name":"Balenciaga","url":"https://i.imgur.com/AzuYFsk.png"},{"name":"Bandai Namco","url":"https://i.imgur.com/xzQOM6N.png"},{"name":"Bank Of America","url":"https://i.imgur.com/37QeCRY.png"},{"name":"Barclays","url":"https://i.imgur.com/rXCOQXS.png"},{"name":"Bing","url":"https://i.imgur.com/nZ13LYv.png"},{"name":"Bitcoin","url":"https://i.imgur.com/DCpZaAg.png"},{"name":"BMW","url":"https://i.imgur.com/vL4CKq6.png"},{"name":"Booking","url":"https://i.imgur.com/tFMbq5g.png"},{"name":"BP","url":"https://i.imgur.com/J0h1AkH.png"},{"name":"Capcom","url":"https://i.imgur.com/O7brz9E.png"},{"name":"Champion","url":"https://i.imgur.com/avdNdrG.png"},{"name":"Cisco","url":"https://i.imgur.com/widM6Fj.png"},{"name":"Citroen","url":"https://i.imgur.com/2QewLJn.png"},{"name":"CNBC","url":"https://i.imgur.com/uqOyH6x.png"},{"name":"Coca-cola","url":"https://i.imgur.com/BjnnA7f.png"},{"name":"Costa","url":"https://i.imgur.com/uPQgX7n.png"},{"name":"Crunchyroll","url":"https://i.imgur.com/qgvuF2r.png"},{"name":"Dodge","url":"https://i.imgur.com/pr0HNNH.png"},{"name":"Dolby","url":"https://i.imgur.com/ryosTGW.png"},{"name":"Dominos","url":"https://i.imgur.com/V8xgWXG.png"},{"name":"DreamWorks","url":"https://i.imgur.com/ngyyrH2.png"},{"name":"Ducati","url":"https://i.imgur.com/H1VdnGo.png"},{"name":"Ebay","url":"https://i.imgur.com/b1gkeIA.png"},{"name":"Eizo","url":"https://i.imgur.com/bKdxG0u.png"},{"name":"Ericsson","url":"https://i.imgur.com/5Hm73Nn.png"},{"name":"Facebook","url":"https://i.imgur.com/QHzMhon.png"},{"name":"Fjallraven","url":"https://imgur.com/NRrveuz"},{"name":"Ford","url":"https://i.imgur.com/gTFfX7E.png"},{"name":"Github","url":"https://i.imgur.com/FbMP0Il.png"},{"name":"Givenchy","url":"https://i.imgur.com/69qMZ0G.png"},{"name":"Google","url":"https://i.imgur.com/e29AL0q.png"},{"name":"Goyard","url":"https://i.imgur.com/bKl2X3a.png"},{"name":"Gucci","url":"https://i.imgur.com/1XiWvO5.png"},{"name":"Honda","url":"https://i.imgur.com/ggZb9IU.png"},{"name":"Huawei","url":"https://i.imgur.com/Wmv5rGq.png"},{"name":"IBM","url":"https://i.imgur.com/jZuaPNS.png"},{"name":"Infiniti","url":"https://i.imgur.com/SYK7IE5.png"},{"name":"Intel","url":"https://i.imgur.com/oezihtx.png"},{"name":"Jaguar","url":"https://i.imgur.com/EV8Wrb5.png"},{"name":"JohnDeere","url":"https://i.imgur.com/W0oFL2U.png"},{"name":"Kappa","url":"https://i.imgur.com/BIDvY90.png"},{"name":"KFC","url":"https://i.imgur.com/RmW2x7U.png"},{"name":"Koenigsegg","url":"https://i.imgur.com/F9emQwW.png"},{"name":"Lamborghini","url":"https://i.imgur.com/CHX9hVC.png"},{"name":"Lexus","url":"https://i.imgur.com/wkqPCVz.png"},{"name":"LG","url":"https://i.imgur.com/9kDxfAP.png"},{"name":"Liteon","url":"https://i.imgur.com/eUxOEZj.png"},{"name":"LouisVuitton","url":"https://i.imgur.com/2Q5Wt30.png"},{"name":"Maersk","url":"https://i.imgur.com/YC8TOFL.png"},{"name":"Mazda","url":"https://i.imgur.com/jkKtd6p.png"},{"name":"McDonalds","url":"https://i.imgur.com/obOfFFM.png"},{"name":"MercedesBenz","url":"https://i.imgur.com/P5f9v4k.png"},{"name":"Microsoft","url":"https://i.imgur.com/mkn0LSt.png"},{"name":"Mitsubishi","url":"https://i.imgur.com/hz6LNmg.png"},{"name":"Monster","url":"https://i.imgur.com/DqgkyMA.png"},{"name":"MonsterCable","url":"https://i.imgur.com/uxrKE0m.png"},{"name":"MTV","url":"https://i.imgur.com/WqkgNQO.png"},{"name":"Nandos","url":"https://i.imgur.com/9mGLril.png"},{"name":"Napster","url":"https://i.imgur.com/U6vdgOb.png"},{"name":"Nestle","url":"https://i.imgur.com/4LguHIE.png"},{"name":"Netflix","url":"https://i.imgur.com/7Fr5GYD.png"},{"name":"Nike","url":"https://i.imgur.com/ZwCEfOg.png"},{"name":"Nintendo","url":"https://i.imgur.com/3zfDWxN.png"},{"name":"Novation","url":"https://i.imgur.com/DuZYD3h.png"},{"name":"Nvidia","url":"https://i.imgur.com/aBuNjqo.png"},{"name":"PapaJohns","url":"https://i.imgur.com/Gzo4dCT.png"},{"name":"Patagonia","url":"https://i.imgur.com/eqVwfNo.png"},{"name":"Peugeot","url":"https://i.imgur.com/0LrLSjb.png"},{"name":"Philips","url":"https://i.imgur.com/xwIW7Am.png"},{"name":"Pioneer","url":"https://i.imgur.com/SP5IMJ8.png"},{"name":"PizzaHut","url":"https://i.imgur.com/HsfOSIS.png"},{"name":"Playboy","url":"https://i.imgur.com/N7MwYAX.png"},{"name":"Playstation","url":"https://i.imgur.com/eC2pI75.png"},{"name":"Porsche","url":"https://i.imgur.com/or4DoNO.png"},{"name":"Rayban","url":"https://i.imgur.com/zQXzxhg.png"},{"name":"Razer","url":"https://i.imgur.com/A62kwHW.png"},{"name":"RedBull","url":"https://i.imgur.com/mvZ5XDI.png"},{"name":"RioTinto","url":"https://i.imgur.com/Ui5KPye.png"},{"name":"Rossignol","url":"https://i.imgur.com/KOSSsq3.png"},{"name":"Samsung","url":"https://i.imgur.com/OaUPLqE.png"},{"name":"Sanyo","url":"https://i.imgur.com/ohwSSu5.png"},{"name":"SAP","url":"https://i.imgur.com/6oPKoXu.png"},{"name":"Shell","url":"https://i.imgur.com/rbTbyPW.png"},{"name":"Skullcandy","url":"https://i.imgur.com/B7wqIBL.png"},{"name":"Skype","url":"https://i.imgur.com/NzvFNQV.png"},{"name":"Snapchat","url":"https://i.imgur.com/0w2BbY1.png"},{"name":"Sonos","url":"https://i.imgur.com/6ogdlRC.png"},{"name":"Sony","url":"https://i.imgur.com/CaHWl8O.png"},{"name":"Soundcloud","url":"https://i.imgur.com/5hh1KIb.png"},{"name":"Spotify","url":"https://i.imgur.com/jwsfviw.png"},{"name":"Starbucks","url":"https://i.imgur.com/ThfBii1.png"},{"name":"Steam","url":"https://i.imgur.com/h62zMGu.png"},{"name":"Subway","url":"https://i.imgur.com/oiwJBRa.png"},{"name":"Superdry","url":"https://i.imgur.com/UJ6QPBK.png"},{"name":"Supreme","url":"https://i.imgur.com/rzhCGAI.png"},{"name":"Tannoy","url":"https://i.imgur.com/SbGyFOE.png"},{"name":"Tesla","url":"https://i.imgur.com/oPQ7pBa.png"},{"name":"The Hundreds","url":"https://i.imgur.com/UgrJOhf.png"},{"name":"Timberland","url":"https://i.imgur.com/OkknrDT.png"},{"name":"Toyota","url":"https://i.imgur.com/EcDI3nW.png"},{"name":"Twitch","url":"https://i.imgur.com/gaOShHU.png"},{"name":"Twitter","url":"https://i.imgur.com/M1mE9Q2.png"},{"name":"Uber","url":"https://i.imgur.com/7QcM4n7.png"},{"name":"Ubisoft","url":"https://i.imgur.com/E8CjpZj.png"},{"name":"Vine","url":"https://i.imgur.com/cSmAzTD.png"},{"name":"Visa","url":"https://i.imgur.com/sKq9qHo.png"},{"name":"Volkswagen","url":"https://i.imgur.com/4LMY5kB.png"},{"name":"Wikipedia","url":"https://i.imgur.com/OENlI5S.png"},{"name":"Xbox","url":"https://i.imgur.com/hEMqtbB.png"},{"name":"Yamaha","url":"https://i.imgur.com/3Mgc1BO.png"},{"name":"YSL","url":"https://i.imgur.com/zGGCVWr.png"}]
6 changes: 3 additions & 3 deletions commands/social/bet.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ module.exports = {
return message.channel.send(`\\❌ **${message.member.displayName}**, You don't have enough coins in your wallet to proceed with that bet.\nGet more coins from your bank by typing \`${client.prefix}withdraw\`.`);
} else {

doc.data.economy.wallet = data.data.wallet - Math.floor(amount);
doc.data.economy.wallet = doc.data.economy.wallet - Math.floor(amount);

return doc.save()
.then(() => message.channel.send(`✔️ **${message.member.displayName}**, Your **${Math.floor(amount)}** has been placed in a bet. Please wait 1 minute for the result.\nOdds for winning the bet is 1/3, and amount won are twice as large up to 10x as large as the original bet!`))
.then(() => message.channel.send(`\\✔️ **${message.member.displayName}**, Your **${Math.floor(amount)}** has been placed in a bet. Please wait 1 minute for the result.\nOdds for winning the bet is 1/3, and amount won are twice as large up to 10x as large as the original bet!`))
.then(async () => {
await Util.delayFor(60000);

Expand All @@ -43,7 +43,7 @@ module.exports = {

doc.data.economy.bank = doc.data.economy.bank + prize;
return doc.save()
.then(() => message.channel.send(`✔️ **${message.member.displayName}**, You won **${text.commatize(amount)}** coins from your previous bet!\nYour bet **${Math.floor(amount)}** coins have multiplied by **${multiplier}**.\nYou'll receive **${text.commatize(prize)}** coins as the prize. Your winnings has been transferred to your bank!`))
.then(() => message.channel.send(`\\✔️ **${message.member.displayName}**, You won **${text.commatize(amount)}** coins from your previous bet!\nYour bet **${Math.floor(amount)}** coins have multiplied by **${multiplier}**.\nYou'll receive **${text.commatize(prize)}** coins as the prize. Your winnings has been transferred to your bank!`))
.catch(() => message.channel.send(`\`❌ Oh no! ${message.member.displayName}, The betting machine just broke! You lost **${text.commatize(amount)}** coins from your previous bet.\nThis doesn't usually happen. Please contact my developer if you receive this message.`))
}).catch(() => message.channel.send(`\`❌ [DATABASE_ERR]:\` Unable to save the document to the database, please try again later!`));
};
Expand Down
64 changes: 64 additions & 0 deletions commands/social/game.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
const { Collection } = require('discord.js');
const { duration: momdur } = require('moment');
const { readdirSync } = require('fs');
const { join } = require('path');

const profile = require(`${process.cwd()}/models/Profile`);
const text = require(`${process.cwd()}/util/string`);

const files = readdirSync(join(process.cwd(), 'util', 'games'));
const jsfiles = files.filter(ext => ext.split('.').pop() === 'js');

const games = jsfiles.map(x => {
return { [x.split('.')[0]]: require(`${process.cwd()}/util/games/${x}`)};
});

module.exports = {
name: 'game',
aliases: [],
database: true,
group: 'social',
clientPermissions: [ 'EMBED_LINKS', 'ATTACH_FILES' ],
description: 'Play some games to earn credits.',
get examples(){ return jsfiles.map(g => this.name + g.split('.')[0] )},
run: (client, message, [ title, ...args]) => profile.findById(message.author.id, (err, doc) => {

const categories = text.joinArray(jsfiles.map(x => x.split('.')[0]));

if (err){
return message.channel.send(`\`❌ [DATABASE_ERR]:\` The database responded with error: ${err.name}`);
} else if (!doc || doc.data.economy.wallet === null){
return message.channel.send(`\\❌ **${message.author.tag}**, register first before playing a game!`);
} else if (!title){
return message.channel.send(`\\❌ **${message.author.tag}**, please provide the game you want to play.\n\n${categories}`);
};

const playGame = games.find(x => x[title])?.[title];

if (!playGame){
return message.channel.send(`\\❌ **${message.author.tag}**, ${title} isn't a playable game. Please select from one below:\n\n${categories}`);
};

const now = Date.now();
const duration = Math.floor(Math.random() * 72e5) + 36e5;
const collection = client.collections.economy.get(title) || client.collections.economy.set(title, new Collection()).get(title);
const userprofile = collection.get(message.author.id) || collection.set(message.author.id, { date: 0 }).get(message.author.id);
const momentduration = momdur(userprofile.date - Date.now()).format('H [hours,] m [minutes, and] s [seconds]');

if (userprofile.date > now){
return message.channel.send(`\\❌ **${message.author.tag}**, please wait \`${momentduration}\` before playing **${title}** again.`);
};

userprofile.date = Date.now() + duration;

const options = {
client,
message,
title,
args,
doc
};

return playGame(options);
})
};
2 changes: 1 addition & 1 deletion commands/social/profile.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module.exports = {
aliases: [ 'rank', 'lvl', 'xp', 'level' ],
guildOnly: true,
rankcommand: true,
cooldown: { time: 30000 },
cooldown: { time: 8000 },
clientPermissions: [ 'ATTACH_FILES' ],
group: 'social',
description: 'Shows the current xp, level, rank, and other details of a user',
Expand Down
Loading

0 comments on commit 8da880a

Please sign in to comment.