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 #73 from Butterstroke/development
Release v1.6.0
- Loading branch information
Showing
32 changed files
with
1,642 additions
and
540 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 |
---|---|---|
@@ -0,0 +1 @@ | ||
* @butterstroke |
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,45 +1,52 @@ | ||
<h1>Margarine's Terms of Service</h1> | ||
The agreements for the users of Margarine and the maintainers of the instance of Margarine. | ||
<h1>MargarineBot's Terms of Service</h1> | ||
The agreements for the users and the maintainers of MargarineBot. | ||
|
||
**Last Updated:** 1 May 2020 | ||
**Last Updated:** 22 April 2021 | ||
|
||
**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 stages of data agreement in which users can interact with Margarine. | ||
By using MargarineBot (aka Margarine), users (defined as anyone with access to Margarine) 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. | ||
|
||
By inviting Margarine into the guild, all users within the guild agree to the first stage. Data stored on this stage is limited to any guild-wide configurations, guild-wide features such as message IDs stored to manage starboards, any temporary data such as a music queue provided by 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. Discord.js is open-sourced and anyone can see what this library does through their Github page linked here: https://github.com/discordjs/discord.js. | ||
There are two types of Margarine users of which users can change to freely. | ||
|
||
The second stage of data agreement is when a user uses Margarine's daily command. The daily command is used to ensure that the user agrees to such permissions and sets up the user profile within Margarine's systems to contain items like: virtual currency (credits) for games, reputation points, usernames for other profiles, etc... By using the daily command, the user is giving Margarine explicit permission to store user data on the user outside of Discord. However, any data that is not from Discord such as usernames from other profiles, are all given through the use of other appropriate commands by the user. All user information is stored under their unique Discord ID. | ||
First type of user is any user within the Discord servers that Margarine serves. Data stored on this stage is limited to any server-wide configurations, server-wide features such as identification numbers stored to manage starboards, roles, moderation logs, etc., and any temporary data such as a music queue (self-hosted only) provided by commands. This data is stored outside of Discord and managed via commands. Any stored user identification for server-wide features is limited to the user's unique Discord identification and all user identification at this stage is deleted upon the user's departure from the server. | ||
|
||
All credits, reputation points, inventory items, etc... that are used within Margarine's economy and commands 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 from the bot. | ||
Additionally, Margarine contains numerous temporary caches of users, servers, etc... as handled by the Discord.js library. Discord.js is a required package which allows Margarine to communicate with Discord's API. Discord.js is open-sourced and anyone can see what this library does through their Github page linked here: https://github.com/discordjs/discord.js. | ||
|
||
Users are asked to make reports about any issues or feedback within Margarine through its report command. This does not require any permission from the user as none of the report data is stored outside of Discord. | ||
Second type is a manual agreement where users can approve of additional data collection via Margarine's daily command. By using the daily command, the user gives Margarine explicit permission to store user data on the user outside of Discord. A user profile with Margarine (aka MargarineUser) stores data such as virtual currency (referred to as credits), reputation points, third party usernames, etc. All user information is stored under their unique Discord ID. Data collected for this type of user is either provided by addtional commands (such as third party usernames) or generated within Margarine's code (such as credits). | ||
|
||
User data can also be sent across Discord. With moderation commands, the moderation messages send both the user's identification and moderator's identification to the user's direct messages and a channel specified (or sent into the same channel if no channel is specified) by a server's moderation team for logging. Additionally, users can make reports about any issues or feedback within Margarine through its report command. Since all data is passed and stored within Discord, there is no user permissions required to access and use these commands. | ||
|
||
**Virtually Generated Data** | ||
|
||
All credits, reputation points, inventory items, etc. that are used within Margarine's commands are generated and hold no real monetary value. They are purely for entertainment. Anyone who is not the developer of Margarine selling any Margarine generated items for real monetary value are to be reported and blacklisted from the bot. | ||
|
||
To report an incident, please send an email to <a href="mailto:[email protected]">[email protected]</a> with a title relating to the incident. | ||
|
||
**Data Requests and Removal:** | ||
|
||
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's information will be sent to them after validation and in a way that is convenient for both parties. After the data has been received, the developer will make sure the sent file is deleted 48-72 hours laters. Any data received is up to the user's discretion and the developer is no longer responsible for said data after file deletion. | ||
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's information will be sent to them after validation and in a way that is convenient for both parties. After the data has been confirmed as received, the sent file is to be deleted 48-72 hours later. The user becomes solely responsible for the data they receive after the transfer. The developer is no longer responsible for the transmitted data after file deletion. | ||
|
||
If a user requests for their user profile to be deleted, they may either use the revoke command within Margarine or message the developer in the contact section below. The data will be deleted after validation with no questions asked. However, users should be warned that there is no recovery of deleted data and any user who deletes their profiles will be locked out of making a new profile for 24 hours. | ||
|
||
For self-hosted versions of Margarine, users must send their requests to the person hosting the instance instead of the developer. | ||
|
||
**Self-Hosting** | ||
**Self-Hosting Instances** | ||
|
||
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. | ||
For self-hosted instances of Margarine, the developer is not responsible for any misuse conducted by the self-hosted instances of the program. Users of these instances are asked to contact the people responsible for the instance for their requests. If general questions about Margarine do arise, users may contact the developer with the provided contacts in the Contact section. | ||
|
||
**Disclaimer:** | ||
|
||
If for any reason Margarine needs to store more data, these terms may change with notice to reflect the state of the project. These changes will always be noted in the patch notes of each release and it is up to the user to see for themselves what has changed between releases. If there are any questions about recent changes, the user may contact the developer through the information in the contact section. | ||
|
||
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. | ||
|
||
The developer of Margarine does not knowingly store any data of users under the age of 13 nor of any user who's account has been deleted. If data on a user with either of the items mentioned exist within Margarine, the data will be deleted. | ||
The developer of Margarine does not knowingly store any data of users under the age of 13 nor of any user who's account has been deleted. If data on a user with either of the items mentioned exist within Margarine, the data will be deleted. In the case of underaged users, the account will also be reported to Discord. | ||
|
||
**Agreement:** | ||
|
||
Users are aware and agree to the following terms defined above. They are also aware that changes in the Terms of Service will be announced in the patch notes for each release. | ||
Users are aware and agree to the following terms defined above. They are also aware that changes in the Terms of Service will be announced in the patch notes for each release. If users continue to use the service after changes within the terms, they are assumed to have agreed to the changes. | ||
|
||
**Contact:** | ||
|
||
For any questions, complaints, etc... either contact me via my Discord server (https://discord.gg/TJJ6KGd) in #margarine-bot or send me an email at <a href="mailto:[email protected]">[email protected]</a>. | ||
Contact the developer via email at <a href="mailto:[email protected]">[email protected]</a> or Discord (https://discord.gg/qKfqsjW) in the #margarine-bot channel. | ||
|
||
For code issues, users are also asked to make a GitHub issue on the [MargarineBot repository](https://github.com/Butterstroke/MargarineBot/issues) when able to for issue tracking. |
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,16 @@ | ||
const { Argument } = require("klasa"); | ||
|
||
module.exports = class extends Argument { | ||
run(arg, possible, msg) { | ||
let x = 0; | ||
const monitorIterator = this.client.monitors.entries(); | ||
while (x < this.client.monitors.size) { | ||
let currMonitor = monitorIterator.next().value; | ||
if (currMonitor[0].toLowerCase() === arg.toLowerCase()) { | ||
return currMonitor[1]; | ||
} | ||
} | ||
|
||
throw msg.language.get("RESOLVER_INVALID_PIECE", possible.name, "monitor"); | ||
} | ||
}; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/* | ||
* Speech module for all monitors | ||
*/ | ||
|
||
module.exports = { | ||
"inviteDetector": [ | ||
"<@!-author>! You posted a Discord invite link which is not allowed on this server.", | ||
"<@!-author>, you cannot post a Discord invite link on this server.", | ||
"<@!-author>, you are not allowed to post Discord invite links on this server" | ||
] | ||
}; |
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,35 @@ | ||
const { Command } = require("klasa"); | ||
|
||
module.exports = class extends Command { | ||
constructor(...args) { | ||
super(...args, { | ||
name: "monitorToggle", | ||
enabled: true, | ||
guarded: true, | ||
runIn: ["text"], | ||
aliases: ["mtoggle"], | ||
description: "Enable or disable a monitor for your server.", | ||
usage: "[monitor:monitor]", | ||
permissionLevel: 6 | ||
}); | ||
|
||
this.humanUse = "<monitor>"; | ||
} | ||
|
||
async run(msg, [monitor]) { | ||
if (!monitor) { return msg.sendLocale("MONITORTOGGLE_NOMONITOR", [msg]); } | ||
|
||
let disabled = msg.guild.settings.monitors[monitor.name]; | ||
|
||
if (disabled === undefined) { | ||
return msg.sendLocale("MONITORTOGGLE_NOTOGGLE", [msg]); | ||
} | ||
|
||
msg.guild.settings.update(`monitors.${monitor.name}`, !disabled, msg.guild).then(() => { | ||
if (disabled) { | ||
return msg.sendLocale("MONITORTOGGLE_DISABLE", [msg, monitor.name]); | ||
} | ||
msg.sendLocale("MONITORTOGGLE_ENABLE", [msg, monitor.name]); | ||
}); | ||
} | ||
}; |
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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
const { Command } = require("klasa"); | ||
|
||
module.exports = class extends Command { | ||
constructor(...args) { | ||
super(...args, { | ||
name: "setleave", | ||
enabled: true, | ||
runIn: ["text"], | ||
description: "Set a leave message for when users leave the server.", | ||
usage: "[show|remove|text:str]", | ||
permissionLevel: 5, | ||
extendedHelp: "Add `-pinguser`, `-username`, `-userid`, and/or `-servername` to the message to have Margarine personalize it. Standard Discord styling still applies.\n\n" + | ||
"This feature requires both a message and a default channel set. Removing either one will disable this feature." | ||
}); | ||
} | ||
|
||
async run(msg, [item]) { | ||
if (item === "show" || item === undefined) { | ||
return msg.channel.send( | ||
msg.guild.settings.leaveMsg.replace("-pinguser", `<@!${msg.author.id}>`) | ||
.replace("-servername", msg.guild.name) | ||
.replace("-userid", msg.author.id) | ||
.replace("-username", msg.author.username) | ||
); | ||
} | ||
|
||
if (item === "remove") { | ||
msg.guild.settings.update("leaveMsg", null).then(() => { | ||
msg.sendLocale("REMOVELEAVE", [msg]); | ||
}); | ||
return; | ||
} | ||
|
||
msg.guild.settings.update("leaveMsg", item).then(() => { | ||
msg.sendLocale("SETLEAVE", [msg, item]); | ||
}); | ||
} | ||
}; |
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,25 @@ | ||
const { Command } = require("klasa"); | ||
|
||
module.exports = class extends Command { | ||
constructor(...args) { | ||
super(...args, { | ||
name: "setmodlog", | ||
enabled: true, | ||
runIn: ["text"], | ||
description: "Set the server's modlog channel.", | ||
usage: "<remove|channel:str>", | ||
permissionLevel: 6, | ||
extendedHelp: "The modlog channel is used for moderation messages. Not setting a modlog channel will redirect these messages to a default channel or the current channel." | ||
}); | ||
} | ||
|
||
async run(msg, [item]) { | ||
if (item && !item.includes("<#")) { return msg.sendLocale("RESOLVER_INVALID_CHANNEL", [item]); } | ||
if (item === "remove") { item = null; } | ||
|
||
msg.guild.settings.update("modlog", item).then(() => { | ||
if (item) { return msg.sendLocale("SETMODLOG", [msg, item]); } | ||
msg.sendLocale("SETMODLOG_REMOVE", [msg, item]); | ||
}); | ||
} | ||
}; |
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,40 @@ | ||
const { Command } = require("klasa"); | ||
|
||
module.exports = class extends Command { | ||
constructor(...args) { | ||
super(...args, { | ||
name: "setwelcome", | ||
enabled: true, | ||
runIn: ["text"], | ||
description: "Set a welcome message for new users to see when they join!", | ||
usage: "[show|remove|text:str]", | ||
permissionLevel: 5, | ||
extendedHelp: "Add `-pinguser`, `-username`, `-userid`, and/or `-servername` to the message to have Margarine personalize it! Standard Discord styling still applies.\n\n" + | ||
"This feature requires both a message and a default channel set. Removing either one will disable this feature." | ||
}); | ||
|
||
this.humanUse = "[show|remove|(welcome message)]"; | ||
} | ||
|
||
async run(msg, [item]) { | ||
if (item === "show" || item === undefined) { | ||
return msg.channel.send( | ||
msg.guild.settings.welcomeMsg.replace("-pinguser", `<@!${msg.author.id}>`) | ||
.replace("-servername", msg.guild.name) | ||
.replace("-userid", msg.author.id) | ||
.replace("-username", msg.author.username) | ||
); | ||
} | ||
|
||
if (item === "remove") { | ||
msg.guild.settings.update("welcomeMsg", null).then(() => { | ||
msg.sendLocale("REMOVEWELCOME", [msg]); | ||
}); | ||
return; | ||
} | ||
|
||
msg.guild.settings.update("welcomeMsg", item).then(() => { | ||
msg.sendLocale("SETWELCOME", [msg, item]); | ||
}); | ||
} | ||
}; |
Oops, something went wrong.