The tipbot for discord
Find a file
ProfessorDey 623250e1b4
Adding Multi User Tipping and Role Tipping
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.
2018-02-06 06:18:05 +00:00
bot Adding Multi User Tipping and Role Tipping 2018-02-06 06:18:05 +00:00
config Tipbot is here! 2017-10-25 21:12:38 +02:00
.babelrc Tipbot is here! 2017-10-25 21:12:38 +02:00
.gitignore Tipbot is here! 2017-10-25 21:12:38 +02:00
LICENSE Create LICENSE 2018-01-25 17:05:02 +01:00
package-lock.json removed ! from IDs 2017-12-25 01:49:45 +01:00
package.json removed ! from IDs 2017-12-25 01:49:45 +01:00
README.md Tipbot is here! 2017-10-25 21:12:38 +02:00
yarn.lock removed trigger on message edits 2017-11-23 01:41:23 +01:00

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