This repository has been archived by the owner on Jan 4, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #54 from Butterstroke/Release-1.0-Klasa
Release 1.0 klasa
- Loading branch information
Showing
121 changed files
with
4,012 additions
and
4,183 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,5 +2,4 @@ node_modules/ | |
.vs/ | ||
.vscode/ | ||
bwd/ | ||
assets/data/ | ||
assets/settings.json |
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 |
---|---|---|
@@ -1,31 +1,29 @@ | ||
# MargarineBot - Version: Beta 0.9 | ||
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/f0cfd83063a4469b8e40bcc824c2600d)](https://www.codacy.com/app/Butterstroke/MargarineBot?utm_source=github.com&utm_medium=referral&utm_content=Butterstroke/MargarineBot&utm_campaign=Badge_Grade) | ||
# MargarineBot - Version: Release 1.0 | ||
![License](https://img.shields.io/github/license/Butterstroke/MargarineBot.svg?style=flat-square) ![Support Server](https://discordapp.com/api/guilds/303253034551476225/widget.png) | ||
|
||
A Discord bot coded in Node.js using the Discord.js Library and the Komada framework. | ||
<b>Dependencies</b> | ||
|
||
![discord.js](https://img.shields.io/badge/discord.js-v12.0.0--dev-brightgreen.svg) ![klasa](https://img.shields.io/badge/Klasa-v0.22.0-brightgreen.svg) ![node](https://img.shields.io/badge/Node-v10.0.0+-brightgreen.svg) | ||
|
||
A Discord bot coded in Node.js using the Discord.js Library and the Klasa framework. | ||
|
||
<b>Introduction:</b> | ||
Created through part-desire, part-what can I do in Discord, part-I'm going to learn Javascript, and part-it's only 12 am thoughts, Margarine has been my personal project for almost 6 months now. I am quite proud of the functionality and the time I have spend into Margarine. I have received plenty of support over the months of developing him and I can't thank those people enough as without that support, Margarine would have never been as big as he is today. I hope that you enjoy either looking at/learning/using Margarine as much as I do. | ||
|
||
*Name Origin:* My typical nickname is Butter. As in the stuff that you put on toast. His name comes from the artificial butter (I tends to call it 'Fake Butter') you can buy in stores called, Margarine. | ||
|
||
Created through part-desire, part-what can I do in Discord, part-I'm going to learn Javascript, and part-it's only 12 am thoughts, Margarine has been my personal project for several years now. For the amount of time and effort I've spent on developing him, I'm quite proud of the functionality and features that I've put into him. I have received plenty of support over his development and I can't thank those people enough as without that support, Margarine would have never been as big or as good as he is today. I hope that you enjoy either looking at/learning/using Margarine as much as I do. | ||
|
||
*Name Origin:* My typical nickname is Butter, as in the stuff that you put on toast. His name comes from the artificial butter (I tends to call it 'Fake Butter') you can buy in stores called, Margarine. | ||
|
||
<b>Features:</b> | ||
- Moderation commands | ||
- Permission levels | ||
- Fun, small games like Rock, Paper, Scissors | ||
- Server/User/role info commands | ||
- Economy system (No SQL or any other server needed! All data is local to the folder.) | ||
- Music commands (Play your favourite tunes through Youtube!) | ||
|
||
<b>Updates:</b> | ||
- 02 June 2018: Beta 0.9 Release | ||
- 30 November 2017: Beta 0.8 Released | ||
- 31 October 2017: Beta 0.7 Released | ||
- 30 September 2017: Beta 0.6 Released | ||
- 15 August 2017: Beta 0.5 Released | ||
- 14 July 2017: Beta 0.4 Released | ||
- 6 June 2017: Beta 0.3 Released | ||
- 30 May 2017: Beta 0.2 Released | ||
|
||
<b>Invite me!</b> | ||
<i>Not available at the current moment as the bot is in development.</i> | ||
- Economy system using a SQLite database | ||
|
||
<a href="https://discordapp.com/oauth2/authorize?client_id=315132794172997633&permissions=60482&scope=bot"> Invite me to your server!</a> | ||
|
||
<b>Contact</b> | ||
|
||
For issues, please use the issue tracker on this repository. | ||
|
||
For any thing else, either contact me by email <a href="mailto:[email protected]">[email protected]</a> or in my [Discord server](https://discord.gg/TJJ6KGd) in the #margarine-bot channel. |
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 |
---|---|---|
@@ -1,29 +1,38 @@ | ||
<h1>Margarine's Terms of Service</h1> | ||
The agreements for the users of Margarine due to Discord's Developer Terms of Service (Defined as Discord TOS). | ||
|
||
**Last Updated:** 24 May, 2018 | ||
**Last Updated:** 22 November 2019 | ||
|
||
**Usage:** | ||
By using Margarine, users agree to have their information usable and manipulated for improving and general use of Margarine. Any data collected will be collected anonymously and, in most cases, not stored. | ||
|
||
There are two levels of data agreement in which users can interact with Margarine. The first level of data agreement is labeled as "having Margarine in the same Discord guild that the user is in". By inviting Margarine into the guild, all users within the guild agree to the first level. The only data stored at this first level is all of the guild configuration settings and a temporary cache of each user which is handled with the Discord.js library, a required package that allows Margarine to communicate with Discord's API. Margarine uses the "master" branch of this library and for further questions about the library can be directed appropriately on their GitHub page linked here: https://github.com/discordjs/discord.js. | ||
There are two stages of data agreement in which users can interact with Margarine. | ||
|
||
The second level of data agreement is labeled as "users who have used the daily command at least once". Since Margarine is not allowed to store user data without explicit permission from the user as part of Discord TOS, the daily command is a way for users to give such permission to store data. The daily command sets up a user profile which contains items such as: credits, reputation points, profile names, and similar items. Any profile names are stored with user's permission as they will set it to their own via a separate command. All user information will be stored under their unique Discord ID. Some commands like the daily and rep command will also store the timestamp in which the user used the command last for the sole purpose of validating a wait period. | ||
By inviting Margarine into the guild, all users within the guild agree to the first stage. Data stored about the users on this stage is any guild configuration settings, any temporary data like a music queue provided by Margarine's own commands, and any temporary cache of the user handled by the Discord.js library. Discord.js is a required package which allows Margarine to communicate with Discord's API. Margarine uses the "master" branch of this library which can be seen and provided by through their Github page linked here: https://github.com/discordjs/discord.js. | ||
|
||
All credits, reputation points, and inventory items are generated and hold no real monetary value. They are purely for entertainment and users who use credits, reputation points, or inventory items for real monetary sales and profits are to be reported and blacklisted. | ||
Users who have used Margarine's daily command at least once agree to the second stage. As apart of Discord's TOS, users need to give Margarine explicit permission to store user data outside of Discord. The daily command is a way to ensure that the user agrees to such permissions. The daily command sets up a user profile with can contain items such as: virtual currency (credits), reputation points, usernames for other profiles, etc... Any usernames for other sites are stored with the user's permission via other appropriate commands. All user information is stored under their unique Discord ID. | ||
|
||
The report command falls under a special category as Margarine takes the user's Discord ID and tag for feedback. Under Discord TOS, this doesn't require any other permission as feedback is sent from the user to Margarine's developer Discord guild where the developer can view, read, and act upon the feedback. Therefore, it stays within Discord and no other actions are required of the data. If abused, the user may be blacklisted from the command. | ||
All credits, reputation points, and inventory items are generated and hold no real monetary value. They are purely for entertainment and users who use credits, reputation points, or inventory items for real monetary sales and profits are to be reported. | ||
|
||
**Developer Usage:** | ||
For users of the developer version of Margarine, a command may be reload with `console.log()` to check variables as they pass through the command. This data is not stored, however, users of the developer version are required to know and accept that their data maybe logged for developmental reason during fixes and improvements. | ||
Users are generally asked to make reports about any issues or feedback of Margarine through its report command. Under Discord TOS, this doesn't require any permission from the user as all information is stored exclusively on Discord. | ||
|
||
**Developer Version Usage:** | ||
|
||
For users of the developer version of Margarine, a command may be reload with `console.log()` to check variables as they pass through the command. This data is not stored, however, users are required to know and accept that their data maybe logged for developmental reason during any fixes and/or improvements. | ||
|
||
**Data Requests and Removal:** | ||
Users may contact the developer for the current user profile on Margarine at any time using the contact information defined in the contact section. The user's information will be sent to them in the most convenient way for both parties and decrypted for general viewing. After the profile has been received, the developer will delete the sent file 48-72 hours later and any leak from that file will be up to the user's responsibility and discretion. | ||
|
||
If the user wants for their user profile to be deleted for whatever reason, they may message the people in the contact section below. However, once deleted, there is no way to recover the lost data. | ||
Any users may contact the developer for their data on Margarine at any time using the contact information defined in the contact section. The user information will be sent to them in the most convenient way for both partied and decrypted for general viewing. After the data has been received, the developer will delete the sent file 48-72 hours later. The data received is up to the user's responsibility and discretion. | ||
|
||
For users who want their user profile deleted, they may message the developer in the contact section below. The data will be deleted with no questions asked. However, users should be warned that there is no way to recover the lost data once deleted. For self-hosted versions of Margarine, the user must send their request to the person responsible for the hosted instance. | ||
|
||
**Self-Hosting** | ||
|
||
For any issues relating to a self-hosted instance of Margarine, the user must send their requests to the person responsible for the self-hosting. The developer is not responsible for any misuse conducted by the self-hosted instances of the program. However, if general questions about Margarine do arise, please see the Contact section of the terms for information on how to get in touch with the developer. | ||
|
||
**Disclaimer:** | ||
If for any reason Margarine needs to store more data, these terms will change with notice in future releases. If users are using the developer version of Margarine, these terms may change overnight. The developer(s) will try to pass the news on quickly, however, cannot guarantee that the news will be current before the changes happen. Any questions based on recent changes, please refer to the Contact section of this file. | ||
|
||
If for any reason Margarine needs to store more data, these terms will change with notice in future releases. If users are using the developer version of Margarine, these terms may change overnight. The developer will try to pass the news on quickly, however, cannot guarantee that the news will be current before the changes happen. Any questions based on recent changes, please refer to the Contact section of this file. | ||
|
||
The developer of Margarine does not knowingly know of any stored data of users under the age of 13. If a user under the age of 13 is found with data on Margarine, the data will be deleted and the user will be reported to Discord. | ||
|
||
|
@@ -36,4 +45,5 @@ Users are aware and agree to the following terms defined above. They are also aw | |
Users are aware and agree to the following terms defined above. They are also aware that changes in the Terms of Service can change overnight and will be notified of these changes as soon as humanly possible. Users are also aware of the potential of `console.log()` in which data will be logged for development purposes defined in the Developer Usage section. | ||
|
||
**Contact:** | ||
For any questions, complaints, etc... either message Butterstroke#7150 via Discord or send me an email at [email protected]. | ||
|
||
For any questions, complaints, etc... either message Butterstroke#7150 via Discord or send me an email at [email protected]. |
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,34 @@ | ||
const { Argument, util: { regExpEsc } } = require("klasa"); | ||
const IDRegex = /^((<@!)|())(\d{17,21})((>)|())$/; | ||
|
||
/* Possible user detection: | ||
* <@!303236614623068161> (Mention) | ||
* 303236614623068161 (User ID) | ||
* Butterstroke (Username) | ||
* Butter (Guild nickname) | ||
*/ | ||
|
||
module.exports = class extends Argument { | ||
constructor(...args) { | ||
super(...args, { aliases: ["usersearch"] }); | ||
} | ||
|
||
async run(arg, possible, msg) { | ||
if (arg === undefined) { return msg.author; } | ||
if (IDRegex.test(arg)) { return this.client.users.get(/(\d{17,21})/.exec(arg)[0]); } | ||
|
||
var results = []; | ||
|
||
if (msg.guild) { | ||
var regex = new RegExp(regExpEsc(arg), "i"); | ||
results = msg.guild.members.filter(m => regex.test(m.user.username)); | ||
} | ||
|
||
if (results.size === 0) { | ||
msg.channel.send(this.client.speech(msg, ["func-system", "usersearch"])); | ||
return null; | ||
} | ||
|
||
return this.client.users.get(results.keys().next().value); | ||
} | ||
}; |
This file was deleted.
Oops, something went wrong.
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,156 @@ | ||
{ | ||
"info": { | ||
"item_structure": { | ||
"sell": 0, | ||
"name": "item_name", | ||
"emote": "item_emote", | ||
"category": "Table in DB", | ||
"subcategory": "Any subcategory of the table", | ||
"recipe": [ | ||
["material_name", "amount"] | ||
] | ||
} | ||
}, | ||
"trash": { | ||
"sell": 0, | ||
"name": "trash", | ||
"emote": "🗑", | ||
"category": "fishing", | ||
"subcategory": "misc" | ||
}, | ||
"fish": { | ||
"sell": 5, | ||
"name": "fish", | ||
"emote": "🐟", | ||
"category": "fishing" | ||
}, | ||
"crab": { | ||
"sell": 15, | ||
"name": "crab", | ||
"emote": "🦀", | ||
"category": "fishing" | ||
}, | ||
"squid": { | ||
"sell": 25, | ||
"name": "squid", | ||
"emote": "🦑", | ||
"category": "fishing" | ||
}, | ||
"shark": { | ||
"sell": 75, | ||
"name": "shark", | ||
"emote": "🦈", | ||
"category": "fishing" | ||
}, | ||
"potato": { | ||
"sell": 15, | ||
"name": "potato", | ||
"emote": "🥔", | ||
"category": "harvest" | ||
}, | ||
"egg": { | ||
"sell": 5, | ||
"name": "egg", | ||
"emote": "🥚", | ||
"category": "harvest" | ||
}, | ||
"bread": { | ||
"sell": 15, | ||
"name": "bread", | ||
"emote": "🍞", | ||
"category": "harvest" | ||
}, | ||
"chocolate": { | ||
"sell": 15, | ||
"name": "chocolate", | ||
"emote": "🍫", | ||
"category": "harvest" | ||
}, | ||
"greenapple": { | ||
"sell": 10, | ||
"name": "green apple", | ||
"emote": "🍏", | ||
"category": "harvest" | ||
}, | ||
"apple": { | ||
"sell": 10, | ||
"name": "apple", | ||
"emote": "🍎", | ||
"category": "harvest" | ||
}, | ||
"lemon": { | ||
"sell": 15, | ||
"name": "lemon", | ||
"emote": "🍋", | ||
"category": "harvest" | ||
}, | ||
"sake": { | ||
"sell": 25, | ||
"name": "sake", | ||
"emote": "🍶", | ||
"category": "harvest" | ||
}, | ||
"rice": { | ||
"sell": 10, | ||
"name": "rice", | ||
"emote": "🍚", | ||
"category": "harvest" | ||
}, | ||
"fishcake": { | ||
"sell": 30, | ||
"name": "fishcake", | ||
"emote": "🍥", | ||
"category": "product", | ||
"subcategory": "food", | ||
"recipe": [ | ||
["fish", 1], | ||
["potato", 1] | ||
] | ||
}, | ||
"cookie": { | ||
"sell": 25, | ||
"name": "cookie", | ||
"emote": "🍪", | ||
"category": "product", | ||
"subcategory": "food", | ||
"recipe": [ | ||
["egg", 1], | ||
["bread", 1], | ||
["chocolate", 2] | ||
] | ||
}, | ||
"oden": { | ||
"sell": 125, | ||
"name": "oden", | ||
"emote": "🍢", | ||
"category": "product", | ||
"subcategory": "food", | ||
"recipe": [ | ||
["sake", 1], | ||
["egg", 5], | ||
["squid", 1] | ||
] | ||
}, | ||
"sushi": { | ||
"sell": 75, | ||
"name": "sushi", | ||
"emote": "🍣", | ||
"category": "product", | ||
"subcategory": "food", | ||
"recipe": [ | ||
["fish", 1], | ||
["squid", 1], | ||
["rice", 2] | ||
] | ||
}, | ||
"recycle": { | ||
"sell": 44, | ||
"name": "recycle", | ||
"emote": "♻", | ||
"category": "product", | ||
"subcategory": "misc", | ||
"recipe": [ | ||
["trash", 10] | ||
] | ||
} | ||
} |
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 |
---|---|---|
@@ -1,21 +1,24 @@ | ||
{ | ||
"permLevels": { | ||
"general": [ | ||
"Level 0: Everyone", | ||
"Level 1: Placeholder", | ||
"Level 2: Guild Moderators", | ||
"Level 3: Guild Admins", | ||
"Level 4: Guild Owners", | ||
"Level 5: Placeholder", "Level 6: Placeholder", "Level 7: Placeholder", "Level 8: Placeholder", | ||
"Level 9: Toast & Butter", | ||
"Level 10: Bot Owner" | ||
], | ||
"addPerms": [ | ||
"with no additional permissions", | ||
"Placeholder", | ||
"with guild moderator permissions", | ||
"with guild admin permissions", | ||
"with guild owner permissions" | ||
] | ||
} | ||
"games": [ | ||
["Playing around with Butterstroke", "play"], | ||
["Hacking to the gate", "listen"], | ||
["Rewatching Occultic;Nine", "watch"], | ||
["Rewatching Robotics;Notes", "watch"], | ||
["Harvesting wild fruits", "play"], | ||
["Partying to weeb tunes", "listen"], | ||
["Breaking all of the code", "play"], | ||
["Spying on Butterstroke", "watch"], | ||
["Chilling out with friends", "play"], | ||
["Conquering all those who oppose me! Oh wait, this isn't a video game", "play"], | ||
["Writing for Kiri Kiri Basara", "play"], | ||
["Playing around with wires", "play"], | ||
["Cooking up a fantastic meal!", "play"], | ||
["Crafting a brand new world", "play"], | ||
["Having a romance comedy to myself!", "play"], | ||
["Reaching for the blue sky", "play"], | ||
["Someday, surely, for the sake of illuminating someone's path, I want to shine", "listen"], | ||
["Considering the possibilities of being an isekai protagonist", "play"], | ||
["Wakarimasen", "watch"], | ||
["At the end of a certain world, what runs through is real force", "listen"] | ||
] | ||
} |
Oops, something went wrong.