-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Social Bug Fixes: - Allow consecutive bets using updates - Replaced Discord delayFor (DATABASE_ERR bug) - Updated README for MacOS setup - Added linting commands to package json - Added missing env variables in the env_example - Corrected bank register message - Allow nullity of bears guild members
- Loading branch information
Showing
8 changed files
with
74 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,9 @@ | |
}, | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1", | ||
"start": "node ./src/index.js" | ||
"start": "node ./src/index.js", | ||
"lint": "eslint .", | ||
"lint:fix": "eslint --fix ." | ||
}, | ||
"repository": "git+https://github.com/Tamako-Tech/Tamako.git", | ||
"keywords": [ | ||
|
@@ -27,7 +29,7 @@ | |
"packageManager": "[email protected]", | ||
"dependencies": { | ||
"animequotes": "^2.0.0", | ||
"canvas": "^2.9.0", | ||
"canvas": "^2.9.1", | ||
"chalk": "^4.1.2", | ||
"cheerio": "^1.0.0-rc.10", | ||
"child_process": "^1.0.2", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
const { join } = require('path'); | ||
const profile = require(join(__dirname, '..', '..', '..', '..', 'Models', 'Profile.js')); | ||
|
||
module.exports = { | ||
name: 'adj-bal', | ||
aliases: [ ], | ||
description: 'Manually adjust balance', | ||
ownerOnly: true, | ||
cooldown: 0, | ||
userPermissions: ['SEND_MESSAGES'], | ||
clientPermissions: [ 'EMBED_LINKS' ], | ||
category: 'Social', | ||
usage: '[wallet|-] [bank|-]', | ||
run: async (client, message, args, container) => profile.findById(message.author.id, (err, doc) => { | ||
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}**, You don't have a *wallet* yet! To create one, type \`${container.Config.prefix[0]}register\`.`); | ||
} | ||
if (args.length < 2) { | ||
args.push('-'); | ||
} | ||
const [wallet, bank] = args; | ||
if (!isNaN(wallet)){ | ||
doc.data.economy.wallet = wallet; | ||
} | ||
if (!isNaN(bank)){ | ||
doc.data.economy.bank = bank; | ||
} | ||
return doc.save() | ||
.then(() => message.channel.send(`\\✔️ **${message.author.tag}**, Your wallet has been set to ${wallet === '-' ? doc.data.economy.wallet : wallet} and bank to ${bank === '-' ? doc.data.economy.bank : bank}`)) | ||
.catch(() => message.channel.send('`❌ [DATABASE_ERR]:` Unable to save the document to the database, please try again later!')); | ||
}) | ||
}; | ||
/** | ||
* @INFO | ||
* Bot Coded by Bear#3437 | https://github.com/bearts | ||
* @INFO | ||
* Tamako Tech | https://tamako.tech/ | ||
* @INFO | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters