Eliminates nesting of if-else statements and follows imperative control logic, making it much clearer what error messages are which and what order logic is handled in. Also neatens up the calls to 'msg.channel.send' into a single compact function declaration. Also eliminates case sensitivity entirely with a minimal performance hit by only performing '.toLowerCase()' on the first check for new/oldrole, though this could be replaced with a regexp object test instead. Every other comparison uses the matched role's name as this is guaranteed to be the correct case, assuming no issues with the config itself. This means users can enter the role in any case, preventing the biggest irritation to most users besides spelling errors. |
||
---|---|---|
bot | ||
config | ||
speech-uploads | ||
.babelrc | ||
.gitignore | ||
.travis.yml | ||
LICENSE | ||
package-lock.json | ||
package.json | ||
README.md |
Bot for LBRY's Discord
(This README will be updated along with bot updates)
Features:
-
Price bot displays price of lbc for currency given.
- Responds to
!price <cur> <amount>
-
Stats bot displays current market stats of lbc.
- Responds to
!stats
-
Hash bot displays current hashrate of lbc network. Also Includes to calculate given MH/s to LBC & fiat per hr, day, week, month.
-
Responds to !hash
-
Responds to !hash power <MH/s> <fiat>
-
AltStats bot displays current market stats of specfied currency
- Responds to
!altstats <coin>
-
AltPrice bot displays current price for given coin and currency
- Responds to
!altprice <coin> <currency> <amount>
-
Github Release Notes bot displays release notes for current LBRY Desktop release.
-
Responds to !releasenotes
-
(moderator only) !releasenotes post
- send to release notes channel
-
Purge Bot deletes X amount of messages.
- (moderator only) Responds to
!purge <X>
-
Speech bot displays top claim from provided image name(coming soon posting to
speech).
- Responds to
!speech <imagename>
-
Welcome bot sends Direct Message when new users join,
- (moderator only) Responds to
!welcome <@username>
-
Timeout bot assigns members the timeout roll for X-minutes where they are restricted from talking
- (moderator only) Responds to
!timeout <@username> <Mins>
-
Roll Setter bot allows users to assign themselves rolls
-
Responds to !addrole <role>
- Adds to Role
-
Responds to !delrole <role>
- Deletes from Role
-
Responds to !roles
- List Available Roles
-
LBRY URL Linker displays lbry:// urls as open.lbry.com links to make them clickable
-
LBRY claim bot displays recent publishes on the lbry protocol
-
IRC bot to connect an irc channel with discord
-
Spam Detection Bot to Prevent Discord Raids and Spammers
-
Dynamic plugin loading with permission support.
Features:
-
Price bot displays price of lbc for currency given.
- Responds to
!price <cur> <amount>
- Responds to
-
Stats bot displays current market stats of lbc.
- Responds to
!stats
- Responds to
-
Hash bot displays current hashrate of lbc network. Also Includes to calculate given MH/s to LBC & fiat per hr, day, week, month.
-
Responds to
!hash
-
Responds to
!hash power <MH/s> <fiat>
-
-
AltStats bot displays current market stats of specfied currency
- Responds to
!altstats <coin>
- Responds to
-
AltPrice bot displays current price for given coin and currency
- Responds to
!altprice <coin> <currency> <amount>
- Responds to
-
Github Release Notes bot displays release notes for current LBRY Desktop release.
-
Responds to
!releasenotes
-
(moderator only)
!releasenotes post
- send to release notes channel
-
-
Purge Bot deletes X amount of messages.
- (moderator only) Responds to
!purge <X>
- (moderator only) Responds to
-
Speech bot displays top claim from provided image name(coming soon posting to speech).
- Responds to
!speech <imagename>
- Responds to
-
Welcome bot sends Direct Message when new users join,
- (moderator only) Responds to
!welcome <@username>
- (moderator only) Responds to
-
Timeout bot assigns members the timeout roll for X-minutes where they are restricted from talking
- (moderator only) Responds to
!timeout <@username> <Mins>
- (moderator only) Responds to
-
Roll Setter bot allows users to assign themselves rolls
-
Responds to
!addrole <role>
- Adds to Role -
Responds to
!delrole <role>
- Deletes from Role -
Responds to
!roles
- List Available Roles
-
-
LBRY URL Linker displays lbry:// urls as open.lbry.com links to make them clickable
-
LBRY claim bot displays recent publishes on the lbry protocol
-
IRC bot to connect an irc channel with discord
-
Spam Detection Bot to Prevent Discord Raids and Spammers
-
Dynamic plugin loading with permission support.
Requirements
- node > 8.0.0
- npm > 6.4.0
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 cd to wunderbot directory and run:
npm install --production
node bot/bot.js
Development
Be sure to run the command below before working on any code, this ensures prettier goes to work and keeps code to our standard.
npm install
to run prettier before submitting your code simply run the following in the bots root directory.
npm run prettier
To be sure your build will pass with TravisCI, also be sure to run
npm run test