The tipbot for discord
623250e1b4
This is actually not too substantial an addition. it adds 2 additional command exports for tipbot, namely !multitip and !roletip. !multitip [private] <user>+ <amount> The more complex new feature, this command will take a list of users, seperated by spaces, and passes through to doTip() if you only list a single user. It tests each word past the ! command and private tag, checking for a user mention using the regex.test() function of the Discord.js USERS_PATTERN, using that to count the number of users mentioned in a row, then takes the first word that is not a match to be the amount. Error checking then returns the appropriate errors to the user, if any. Otherwise it proceeds to send tips to each user individually. this results in messages for every user that receives a tip, which can be messy. It will also message the author once for every user a tip is sent to, if using private mode, this isn't ideal, but would require rewriting the sendLbc() function, which is outside the scope of this commit. !roletip <role> <amount> This is a relatively simpler feature, the command taking a single role and an amount, then extracting the userIDs from the role via the Roles.members and GuildMember.user values. It will return seperate errors for a lack of a role in the message and the lack of any users in a role. Like the !multitip command, it will send tips individually to each user, with the same spam of messages either in the channel or the author's private channel. |
||
---|---|---|
bot | ||
config | ||
.babelrc | ||
.gitignore | ||
LICENSE | ||
package-lock.json | ||
package.json | ||
README.md | ||
yarn.lock |
Bot for LBRY's Discord
(This README will be updated along with bot updates) Features:
- Tipbot for LBC. Responds to
!tip
. - Dynamic plugin loading with permission support.
Requirements
- node > 8.0.0
- npm > 0.12.x
Installation
Create a bot and get the bot's API Token: https://discordapp.com/developers/applications/me
Edit and rename default.json.example in /config, then run:
npm install
node bot.js