mirror of
https://github.com/LBRYFoundation/lbry-wunderbot.git
synced 2025-08-31 01:11:32 +00:00
Wunderbot v2 is starting to take shape...
This commit is contained in:
parent
e9f32140f8
commit
adbf5d6bf9
19 changed files with 2883 additions and 1832 deletions
11
.babelrc
11
.babelrc
|
@ -1,3 +1,12 @@
|
|||
{
|
||||
"presets": ["node8"]
|
||||
"presets": [
|
||||
[
|
||||
"@babel/preset-env",
|
||||
{
|
||||
"targets": {
|
||||
"node": "current"
|
||||
}
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
|
|
12
.editorconfig
Normal file
12
.editorconfig
Normal file
|
@ -0,0 +1,12 @@
|
|||
root = true
|
||||
|
||||
[*]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
end_of_line = lf
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
4
.eslintignore
Normal file
4
.eslintignore
Normal file
|
@ -0,0 +1,4 @@
|
|||
# /node_modules/* and /bower_components/* ignored by default
|
||||
|
||||
# Ignore built files except build/index.js
|
||||
dist/*
|
40
.eslintrc
Normal file
40
.eslintrc
Normal file
|
@ -0,0 +1,40 @@
|
|||
{
|
||||
"parser": "babel-eslint",
|
||||
"env": {
|
||||
"node": true
|
||||
},
|
||||
"extends": ["airbnb-base", "prettier"],
|
||||
"rules": {
|
||||
"func-names": 0,
|
||||
"max-len": [1, 120],
|
||||
"no-unused-vars": 0,
|
||||
"no-script-url": 0,
|
||||
"import/no-unresolved": 0,
|
||||
"import/no-extraneous-dependencies": 0,
|
||||
"no-console": 0,
|
||||
"no-undef": 0,
|
||||
"import/prefer-default-export": 0,
|
||||
"global-require": 0,
|
||||
"comma-dangle": ["off"],
|
||||
"import/extensions": 0,
|
||||
"guard-for-in": ["warn"],
|
||||
"no-restricted-syntax": ["warn"],
|
||||
"object-curly-spacing": ["off"],
|
||||
"padded-blocks": ["off"],
|
||||
"no-underscore-dangle": [
|
||||
"error",
|
||||
{
|
||||
"allowAfterThis": true
|
||||
}
|
||||
],
|
||||
"no-plusplus": 0,
|
||||
"no-shadow": 0,
|
||||
"class-methods-use-this": 0,
|
||||
"consistent-return": 0,
|
||||
"indent": ["error", 4],
|
||||
"eol-last": [1, "always"]
|
||||
},
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 6
|
||||
}
|
||||
}
|
18
.gitignore
vendored
18
.gitignore
vendored
|
@ -1,15 +1,9 @@
|
|||
# Logs
|
||||
logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
# dist
|
||||
dist/*
|
||||
#configuration
|
||||
config/default.json
|
||||
|
||||
# Runtime data
|
||||
pids
|
||||
*.pid
|
||||
|
@ -34,7 +28,7 @@ bower_components
|
|||
# node-waf configuration
|
||||
.lock-wscript
|
||||
|
||||
# Compiled binary addons (https://nodejs.org/api/addons.html)
|
||||
# Compiled binary addons (http://nodejs.org/api/addons.html)
|
||||
build/Release
|
||||
|
||||
# Dependency directories
|
||||
|
@ -60,4 +54,12 @@ typings/
|
|||
.yarn-integrity
|
||||
|
||||
# dotenv environment variables file
|
||||
.env
|
||||
.env
|
||||
|
||||
###################################
|
||||
|
||||
# Ignore config directory
|
||||
config/*
|
||||
|
||||
# Besides examples
|
||||
!config/*.example.json
|
34
.vscode/launch.json
vendored
Normal file
34
.vscode/launch.json
vendored
Normal file
|
@ -0,0 +1,34 @@
|
|||
{
|
||||
// Use IntelliSense to learn about possible Node.js debug attributes.
|
||||
// Hover to view descriptions of existing attributes.
|
||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
"name": "Launch Program",
|
||||
"program": "${workspaceRoot}/node_modules/nodemon/bin/nodemon.js",
|
||||
"cwd": "${workspaceRoot}",
|
||||
"stopOnEntry": false,
|
||||
"args": [
|
||||
"${workspaceRoot}/src/index.js"
|
||||
],
|
||||
"runtimeArgs": [
|
||||
"--nolazy"
|
||||
],
|
||||
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/babel-node",
|
||||
"protocol": "inspector"
|
||||
},
|
||||
{
|
||||
"type": "node",
|
||||
"request": "attach",
|
||||
"name": "Attach to Process",
|
||||
"port": 41000,
|
||||
"address": "localhost",
|
||||
"restart": false,
|
||||
"localRoot": "${workspaceRoot}",
|
||||
"protocol": "inspector"
|
||||
}
|
||||
]
|
||||
}
|
14
.vscode/settings.json
vendored
Normal file
14
.vscode/settings.json
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
// Format a file on save. A formatter must be available, the file must not be auto-saved, and editor must not be shutting down.
|
||||
"editor.formatOnSave": true,
|
||||
"editor.tabSize": 4,
|
||||
"editor.detectIndentation": true,
|
||||
// Enable/disable JavaScript validation. (For Flow)
|
||||
"javascript.validate.enable": false,
|
||||
// Enable/disable default JavaScript formatter (For Prettier)
|
||||
"javascript.format.enable": false,
|
||||
// Use 'prettier-eslint' instead of 'prettier'. Other settings will only be fallbacks in case they could not be inferred from eslint rules.
|
||||
"prettier.eslintIntegration": true,
|
||||
"files.eol": "\n",
|
||||
"typescript.check.workspaceVersion": false
|
||||
}
|
28
LICENSE
28
LICENSE
|
@ -1,15 +1,21 @@
|
|||
The MIT License (MIT)
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2016-2018 LBRY Inc
|
||||
Copyright (c) 2018 LBRYio
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the
|
||||
following conditions:
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
|
109
README.md
109
README.md
|
@ -1,107 +1,2 @@
|
|||
## Bot for [LBRY's Discord](https://discord.gg/tgnNHf5)
|
||||
|
||||
(This README will be updated along with bot updates)
|
||||
|
||||
<h3>
|
||||
<details><summary>Features:</summary>
|
||||
|
||||
* 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-app 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.io 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.
|
||||
|
||||
</details>
|
||||
</h3>
|
||||
|
||||
____
|
||||
|
||||
### Requirements
|
||||
|
||||
* node > 8.0.0
|
||||
* npm > 0.12.x
|
||||
* yarn ( install with npm install -g yarn if not installed )
|
||||
____
|
||||
### 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:
|
||||
|
||||
```
|
||||
yarn install
|
||||
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.
|
||||
|
||||
```
|
||||
yarn install --production=false
|
||||
```
|
||||
to run prettier before submitting your code simply run the following in the bots root directory.
|
||||
|
||||
```
|
||||
yarn precommit
|
||||
```
|
||||
# wunderbot
|
||||
A blazing fast discord bot
|
||||
|
|
|
@ -1,796 +0,0 @@
|
|||
{
|
||||
"!helpcommands": {
|
||||
"usage": "",
|
||||
"description": "List of Helpful LBRY Commands",
|
||||
"operation": "none",
|
||||
"bundle": {
|
||||
"url": "",
|
||||
"title": "",
|
||||
"description": "filled at runtime",
|
||||
"color": 7976557,
|
||||
"author": {
|
||||
"name": "List of Helpful LBRY Commands",
|
||||
"url": "",
|
||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
||||
}
|
||||
}
|
||||
},
|
||||
"!what": {
|
||||
"usage": "",
|
||||
"description": "What Is LBRY?",
|
||||
"operation": "send",
|
||||
"bundle": {
|
||||
"url": "https://lbry.io/what",
|
||||
"title": "*Click Here for more Info!*",
|
||||
"description":
|
||||
"[**LBRY**](https://lbry.io) is a protocol providing fully decentralized network for the discovery, distribution, and payment of data. It utilizes the [**LBRY blockchain**](https://lbry.io/what#the-network) as a global namespace and database of digital content. Blockchain entries contain searchable content metadata, identities, and rights and access rules. \n[_**Get the app here**_](https://lbry.io/get)",
|
||||
"color": 7976557,
|
||||
"author": {
|
||||
"name": "What Is LBRY?",
|
||||
"url": "https://lbry.io/what",
|
||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
||||
}
|
||||
}
|
||||
},
|
||||
"!begging": {
|
||||
"usage": "",
|
||||
"description": "Don't Request Free Coins Message",
|
||||
"operation": "send",
|
||||
"bundle": {
|
||||
"url": "",
|
||||
"title": "",
|
||||
"description": ":warning: **Please don't request free coins or invites, we have a strict policy against begging. Further offenses will result in removal from the chat.**",
|
||||
"color": 7976557,
|
||||
"author": {
|
||||
"name": "BEGGING!",
|
||||
"url": "",
|
||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
||||
}
|
||||
}
|
||||
},
|
||||
"!beta": {
|
||||
"usage": "",
|
||||
"description": "Beta Message",
|
||||
"operation": "send",
|
||||
"bundle": {
|
||||
"url": "",
|
||||
"title": "",
|
||||
"description": "Even though LBRY is in Open Beta, it's still beta software! There will be bugs and issues to be worked out. Thanks for your patience!",
|
||||
"color": 7976557,
|
||||
"author": {
|
||||
"name": "Open Beta",
|
||||
"url": "",
|
||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
||||
}
|
||||
}
|
||||
},
|
||||
"!github": {
|
||||
"usage": "",
|
||||
"description": "LBRY GitHub",
|
||||
"operation": "send",
|
||||
"bundle": {
|
||||
"url": "",
|
||||
"title": "",
|
||||
"description": "The official GitHub for LBRY is [github.com/lbryio](https://github.com/lbryio)",
|
||||
"color": 7976557,
|
||||
"author": {
|
||||
"name": "LBRY GitHub",
|
||||
"url": "https://github.com/lbryio",
|
||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
||||
}
|
||||
}
|
||||
},
|
||||
"!appdownload": {
|
||||
"usage": "",
|
||||
"description": "LBRY App Installers",
|
||||
"operation": "send",
|
||||
"bundle": {
|
||||
"url": "",
|
||||
"title": "",
|
||||
"description": "**Installers for the LBRY app are available for download** [**HERE**](https://lbry.io/get)",
|
||||
"color": 7976557,
|
||||
"author": {
|
||||
"name": "Get The LBRY App",
|
||||
"url": "http://lbry.io/get?auto=1",
|
||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
||||
}
|
||||
}
|
||||
},
|
||||
"!daemondownload": {
|
||||
"usage": "",
|
||||
"description": "LBRY Daemon Installers",
|
||||
"operation": "send",
|
||||
"bundle": {
|
||||
"url": "",
|
||||
"title": "",
|
||||
"description": "Installers for the LBRY daemon are available for download [**HERE**](https://github.com/lbryio/lbry/releases)",
|
||||
"color": 7976557,
|
||||
"author": {
|
||||
"name": "LBRY Daemon Download",
|
||||
"url": "https://github.com/lbryio/lbry/releases",
|
||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
||||
}
|
||||
}
|
||||
},
|
||||
"!directories": {
|
||||
"usage": "",
|
||||
"description": "LBRY App Directories",
|
||||
"operation": "send",
|
||||
"bundle": {
|
||||
"url": "",
|
||||
"title": "",
|
||||
"description": "You can find details about the folders your LBRY files are stored in at [lbry.io/faq/lbry-directories](https://lbry.io/faq/lbry-directories)",
|
||||
"color": 7976557,
|
||||
"author": {
|
||||
"name": "LBRY Directories",
|
||||
"url": "https://lbry.io/faq/lbry-directories",
|
||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
||||
}
|
||||
}
|
||||
},
|
||||
"!faq": {
|
||||
"usage": "",
|
||||
"description": "LBRY FAQ",
|
||||
"operation": "send",
|
||||
"bundle": {
|
||||
"url": "",
|
||||
"title": "",
|
||||
"description": "These questions and many more have been answered on the [FAQ Page](https://lbry.io/faq/)",
|
||||
"color": 7976557,
|
||||
"author": {
|
||||
"name": "LBRY FAQ",
|
||||
"url": "https://lbry.io/faq/",
|
||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
||||
}
|
||||
}
|
||||
},
|
||||
"!contribute": {
|
||||
"usage": "",
|
||||
"description": "Contributing to LBRY",
|
||||
"operation": "send",
|
||||
"bundle": {
|
||||
"url": "",
|
||||
"title": "",
|
||||
"description": "Want to help develop and contribute to the LBRY Project?\nCheck out **[GUIDE](https://lbry.io/faq/contributing)** to help you get you started.",
|
||||
"color": 7976557,
|
||||
"author": {
|
||||
"name": "Contributing to LBRY",
|
||||
"url": "https://lbry.io/faq/contributing",
|
||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
||||
}
|
||||
}
|
||||
},
|
||||
"!news": {
|
||||
"usage": "",
|
||||
"description": "LBRY Inc. Newsfeed",
|
||||
"operation": "send",
|
||||
"bundle": {
|
||||
"url": "",
|
||||
"title": "",
|
||||
"description": "Check out the newsfeed **[HERE](https://lbry.io/news)**.",
|
||||
"color": 7976557,
|
||||
"author": {
|
||||
"name": "LBRY Inc. Newsfeed",
|
||||
"url": "https://lbry.io/news",
|
||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
||||
}
|
||||
}
|
||||
},
|
||||
"!name": {
|
||||
"usage": "",
|
||||
"description": "Change Name Message",
|
||||
"operation": "send",
|
||||
"bundle": {
|
||||
"url": "",
|
||||
"title": "",
|
||||
"description": ":warning: Hey, glad to see you love **LBRY** so much, but for the safety of our users we ask that you avoid using **Discord names** that include the word **LBRY**, names of **LBRY staff**, names of other **LBRY members** on the this server or any name that could be considered **deceptive**. This is to prevent impersonation and scams.",
|
||||
"color": 7976557,
|
||||
"author": {
|
||||
"name": "Discord Username",
|
||||
"url": "",
|
||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
||||
}
|
||||
}
|
||||
},
|
||||
"!mining": {
|
||||
"usage": "",
|
||||
"description": "Mining LBRY Credits (LBC)",
|
||||
"operation": "send",
|
||||
"bundle": {
|
||||
"url": "",
|
||||
"title": "",
|
||||
"description": "We have a dedicated channel for mining discussion, feel free to join <#363049669636390913>. We have guides pinned in that channel to get you started mining some LBC!",
|
||||
"color": 7976557,
|
||||
"author": {
|
||||
"name": "Mining LBC",
|
||||
"url": "",
|
||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
||||
}
|
||||
}
|
||||
},
|
||||
"!pricestance": {
|
||||
"usage": "",
|
||||
"description": "Our Stance on LBC Price",
|
||||
"operation": "send",
|
||||
"bundle": {
|
||||
"url": "",
|
||||
"title": "",
|
||||
"description": "Details about our stance on price can be found here: [lbry.io/news/acryptypical](https://lbry.io/news/acryptypical)",
|
||||
"color": 7976557,
|
||||
"author": {
|
||||
"name": "CEO's Stance on Price",
|
||||
"url": "https://lbry.io/news/acryptypical",
|
||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
||||
}
|
||||
}
|
||||
},
|
||||
"!youtuber": {
|
||||
"usage": "",
|
||||
"description": "Are You a YouTuber Curious About LBRY?",
|
||||
"operation": "send",
|
||||
"bundle": {
|
||||
"url": "",
|
||||
"title": "",
|
||||
"description": "Are you a YouTuber curious about LBRY? Have a look at [lbry.io/youtube](https://lbry.io/youtube)",
|
||||
"color": 7976557,
|
||||
"author": {
|
||||
"name": "Are You a YouTuber?",
|
||||
"url": "https://lbry.io/youtube",
|
||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
||||
}
|
||||
}
|
||||
},
|
||||
"!publish": {
|
||||
"usage": "",
|
||||
"description": "How to Publish on LBRY?",
|
||||
"operation": "send",
|
||||
"bundle": {
|
||||
"url": "",
|
||||
"title": "",
|
||||
"description": "We've created a small guide to help with the Publishing features of LBRY, check it out here: [lbry.io/faq/how-to-publish](https://lbry.io/faq/how-to-publish)",
|
||||
"color": 7976557,
|
||||
"author": {
|
||||
"name": "How to Publish on LBRY?",
|
||||
"url": "https://lbry.io/faq/how-to-publish",
|
||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
||||
}
|
||||
}
|
||||
},
|
||||
"!random": {
|
||||
"usage": "",
|
||||
"description": "Off-Topic Messages",
|
||||
"operation": "send",
|
||||
"bundle": {
|
||||
"url": "",
|
||||
"title": "",
|
||||
"description": "Please keep conversations on topic, or move random conversations to #363084227518136322 if you wish to continue",
|
||||
"color": 7976557,
|
||||
"author": {
|
||||
"name": "Random",
|
||||
"url": "",
|
||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
||||
}
|
||||
}
|
||||
},
|
||||
"!naming": {
|
||||
"usage": "",
|
||||
"description": "How Does LBRY Naming Work?",
|
||||
"operation": "send",
|
||||
"bundle": {
|
||||
"url": "",
|
||||
"title": "",
|
||||
"description":
|
||||
"Names exist so that we can map a human readable and understandable word or term to a more difficult to remember number or ID. In the traditional domain system, names map to numerical IP addresses. In LBRY, names map to a unique, permanent ID representing a piece of digital content and/or a publisher identity. Learn more **[HERE](https://lbry.io/faq/naming)**",
|
||||
"color": 7976557,
|
||||
"author": {
|
||||
"name": "How Does LBRY Naming Work?",
|
||||
"url": "https://lbry.io/faq/naming",
|
||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
||||
}
|
||||
}
|
||||
},
|
||||
"!bounty": {
|
||||
"usage": "",
|
||||
"description": "LBRY Bounties",
|
||||
"operation": "send",
|
||||
"bundle": {
|
||||
"url": "",
|
||||
"title": "",
|
||||
"description":
|
||||
"You can earn LBRY Credits for completing tasks as part of the LBRY Bounty Program, All bounties can be seen on the **[Bounty Home Page](https://lbry.io/bounty)**.\nBounties range from simple typo fixes to third party applications and custom projects.",
|
||||
"color": 7976557,
|
||||
"author": {
|
||||
"name": "LBRY Bounties",
|
||||
"url": "https://lbry.io/bounty",
|
||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
||||
}
|
||||
}
|
||||
},
|
||||
"!roadmap": {
|
||||
"usage": "",
|
||||
"description": "The LBRY RoadMap",
|
||||
"operation": "send",
|
||||
"bundle": {
|
||||
"url": "",
|
||||
"title": "",
|
||||
"description":
|
||||
"Check out the **[RoadMap](https://lbry.io/roadmap)**, it only outlines past and anticipated technical changes, it does not cover other initiatives. Development was fast and furious among a small group prior to 0.6, and release notes are sparse.",
|
||||
"color": 7976557,
|
||||
"author": {
|
||||
"name": "RoadMap",
|
||||
"url": "https://lbry.io/roadmap",
|
||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
||||
}
|
||||
}
|
||||
},
|
||||
"!referrals": {
|
||||
"usage": "",
|
||||
"description": "What Are Referrals?",
|
||||
"operation": "send",
|
||||
"bundle": {
|
||||
"url": "",
|
||||
"title": "",
|
||||
"description": "Please see [lbry.io/faq/referrals](https://lbry.io/faq/referrals) - Referral redemptions are currently in test mode and limited to one. But you can see your entire referral history in your LBRY app.",
|
||||
"color": 7976557,
|
||||
"author": {
|
||||
"name": "Referrals",
|
||||
"url": "https://lbry.io/faq/referrals",
|
||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
||||
}
|
||||
}
|
||||
},
|
||||
"!rewards": {
|
||||
"usage": "",
|
||||
"description": "What Are Rewards?",
|
||||
"operation": "send",
|
||||
"bundle": {
|
||||
"url": "",
|
||||
"title": "",
|
||||
"description":
|
||||
"[Rewards](https://lbry.io/faq/rewards) are given to legitimate users who are using the system (and in turn are testing things for us). In order to redeem rewards, you may need to verify your identity through a credit card or other manual methods.\n Please see [lbry.io/faq/identity-requirements](https://lbry.io/faq/identity-requirements)",
|
||||
"color": 7976557,
|
||||
"author": {
|
||||
"name": "Rewards",
|
||||
"url": "https://lbry.io/faq/rewards",
|
||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
||||
}
|
||||
}
|
||||
},
|
||||
"!rewardsvsreferrals": {
|
||||
"usage": "",
|
||||
"description": "Difference Between Rewards & Referrals?",
|
||||
"operation": "send",
|
||||
"bundle": {
|
||||
"url": "",
|
||||
"title": "",
|
||||
"description": "Rewards are different to referral bonuses. Rewards are given for testing the LBRY software and system. Referrals are given for sharing LBRY with the masses.",
|
||||
"color": 7976557,
|
||||
"author": {
|
||||
"name": "Rewards vs Referrals",
|
||||
"url": "",
|
||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
||||
}
|
||||
}
|
||||
},
|
||||
"!cc": {
|
||||
"usage": "",
|
||||
"description": "Credit Card Verification?",
|
||||
"operation": "send",
|
||||
"bundle": {
|
||||
"url": "",
|
||||
"title": "",
|
||||
"description":
|
||||
"In an effort to limit abuse, newly invited LBRY users will be required to verify their identity via a credit card or by a manual verification process in order to be eligible for Rewards. Prepaid or virtual credit cards are disallowed. Certain countries (where we've previously seen abuse) are being denied, but that list may expand later on. If you use Tor/Proxy/VPN, you also may be denied. If credit card verification does not work for you, please go to the <#363050496023592961> channel for assistance.\n**Verification is purely optional and ONLY relevant for Rewards. The LBRY app can be used without providing CC information**\n**Please See:https://lbry.io/faq/identity-requirements**",
|
||||
"color": 7976557,
|
||||
"author": {
|
||||
"name": "Credit Card Verification",
|
||||
"url": "https://lbry.io/faq/identity-requirements",
|
||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
||||
}
|
||||
}
|
||||
},
|
||||
"!verify": {
|
||||
"usage": "",
|
||||
"description": "How to Verify?",
|
||||
"operation": "send",
|
||||
"bundle": {
|
||||
"url": "",
|
||||
"title": "",
|
||||
"description":
|
||||
"Please download the latest version from [HERE](https://lbry.io/get) Upon install, you'll be greeted with a welcome message. If you already had the app installed, please go to the wallet (bank icon in the top right) > Rewards - This should show your current status. New users will need to verify in order to access Rewards. Type !cc or !verification for more information.",
|
||||
"color": 7976557,
|
||||
"author": {
|
||||
"name": "How to Verify?",
|
||||
"url": "",
|
||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
||||
}
|
||||
}
|
||||
},
|
||||
"!verification": {
|
||||
"usage": "",
|
||||
"description": "Verification Help Message",
|
||||
"operation": "send",
|
||||
"bundle": {
|
||||
"url": "",
|
||||
"title": "",
|
||||
"description":
|
||||
"If you would like to be verified, please go to <#363050496023592961> and type *`-new`* \nthis will create a ticket (channel) for your request. A LBRY mod will get back to you as soon as possible. We appreciate your patience. Only one account per household is allowed access to LBRY Rewards. Check out our [YouTube Sync FAQ](https://lbry.io/faq/youtube) for assistance with the YouTube Sync rewards verification method.",
|
||||
"color": 7976557,
|
||||
"author": {
|
||||
"name": "Rewards Verification",
|
||||
"url": "",
|
||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
||||
}
|
||||
}
|
||||
},
|
||||
"!logfile": {
|
||||
"usage": "",
|
||||
"description": "How to Find LBRY App Log File?",
|
||||
"operation": "send",
|
||||
"bundle": {
|
||||
"url": "",
|
||||
"title": "",
|
||||
"description": "You can find your log files by following the guide [HERE](https://lbry.io/faq/how-to-find-lbry-log-file)",
|
||||
"color": 7976557,
|
||||
"author": {
|
||||
"name": "How to Find My LogFile?",
|
||||
"url": "https://lbry.io/faq/how-to-find-lbry-log-file",
|
||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
||||
}
|
||||
}
|
||||
},
|
||||
"!backup": {
|
||||
"usage": "",
|
||||
"description": "How to Backup the Wallet",
|
||||
"operation": "send",
|
||||
"bundle": {
|
||||
"url": "",
|
||||
"title": "",
|
||||
"description": "Please see this guide on how to backup your wallet: [lbry.io/faq/how-to-backup-wallet](https://lbry.io/faq/how-to-backup-wallet)",
|
||||
"color": 7976557,
|
||||
"author": {
|
||||
"name": "How to Backup My Wallet?",
|
||||
"url": "https://lbry.io/faq/how-to-backup-wallet",
|
||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
||||
}
|
||||
}
|
||||
},
|
||||
"!startup": {
|
||||
"usage": "",
|
||||
"description": "Startup Troubleshooting?",
|
||||
"operation": "send",
|
||||
"bundle": {
|
||||
"url": "",
|
||||
"title": "",
|
||||
"description": "Please see [lbry.io/faq/startup-troubleshooting](https://lbry.io/faq/startup-troubleshooting) if you are having trouble getting LBRY to start correctly.",
|
||||
"color": 7976557,
|
||||
"author": {
|
||||
"name": "Startup Troubleshooting",
|
||||
"url": "https://lbry.io/faq/startup-troubleshooting",
|
||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
||||
}
|
||||
}
|
||||
},
|
||||
"!streamingissues": {
|
||||
"usage": "",
|
||||
"description": "Unable to Stream?",
|
||||
"operation": "send",
|
||||
"bundle": {
|
||||
"url": "",
|
||||
"title": "",
|
||||
"description": "Please see [lbry.io/faq/unable-to-stream](https://lbry.io/faq/unable-to-stream) if you are experiencing problems viewing **ANY** LBRY content.",
|
||||
"color": 7976557,
|
||||
"author": {
|
||||
"name": "Streaming Troubleshooting",
|
||||
"url": "https://lbry.io/faq/unable-to-stream",
|
||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
||||
}
|
||||
}
|
||||
},
|
||||
"!ports": {
|
||||
"usage": "",
|
||||
"description": "LBRY Ports",
|
||||
"operation": "send",
|
||||
"bundle": {
|
||||
"url": "",
|
||||
"title": "",
|
||||
"description":
|
||||
"The daemon uses ports **3333** and **4444**. It may interfere with mining software, Start the miner after the app and you should be okay. Also these ports need to be port forwarded on your router. Google is your friend there. \n **Please see this tutorial on how to change ports : [lbry.io/faq/how-to-change-port](https://lbry.io/faq/how-to-change-port)**",
|
||||
"color": 7976557,
|
||||
"author": {
|
||||
"name": "Ports",
|
||||
"url": "https://lbry.io/faq/how-to-change-port",
|
||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
||||
}
|
||||
}
|
||||
},
|
||||
"!migrate": {
|
||||
"usage": "",
|
||||
"description": "How to Migrate Your Wallet/Data",
|
||||
"operation": "send",
|
||||
"bundle": {
|
||||
"url": "",
|
||||
"title": "",
|
||||
"description": "Please see [lbry.io/faq/backup-data](https://lbry.io/faq/backup-data) for instructions on how to backup and/or migrate your LBRY data",
|
||||
"color": 7976557,
|
||||
"author": {
|
||||
"name": "How to Backup/Migrate LBRY Data?",
|
||||
"url": "https://lbry.io/faq/backup-data",
|
||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
||||
}
|
||||
}
|
||||
},
|
||||
"!tipping": {
|
||||
"usage": "",
|
||||
"description": "Details About LBRY App Tipping",
|
||||
"operation": "send",
|
||||
"bundle": {
|
||||
"url": "",
|
||||
"title": "",
|
||||
"description": "Please see [lbry.io/faq/tipping](https://lbry.io/faq/tipping) for details about tipping in the LBRY app",
|
||||
"color": 7976557,
|
||||
"author": {
|
||||
"name": "LBRY App Tipping?",
|
||||
"url": "https://lbry.io/faq/tipping",
|
||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
||||
}
|
||||
}
|
||||
},
|
||||
"!email": {
|
||||
"usage": "",
|
||||
"description": "How to Change Email in the LBRY App",
|
||||
"operation": "send",
|
||||
"bundle": {
|
||||
"url": "",
|
||||
"title": "",
|
||||
"description": "If you need to change your LBRY connected email, please see these instructions [HERE](https://lbry.io/faq/how-to-change-email)",
|
||||
"color": 7976557,
|
||||
"author": {
|
||||
"name": "How to Change Email in the LBRY App",
|
||||
"url": "https://lbry.io/faq/how-to-change-email",
|
||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
||||
}
|
||||
}
|
||||
},
|
||||
"!cli": {
|
||||
"usage": "",
|
||||
"description": "How to Interact with LBRY CLI?",
|
||||
"operation": "send",
|
||||
"bundle": {
|
||||
"url": "",
|
||||
"title": "",
|
||||
"description": "If you are interested in interacting with the LBRY protocol via commands, check out [lbry.io/faq/how-to-cli](https://lbry.io/faq/how-to-cli)",
|
||||
"color": 7976557,
|
||||
"author": {
|
||||
"name": "Interact with the LBRY CLI",
|
||||
"url": "https://lbry.io/faq/how-to-cli",
|
||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
||||
}
|
||||
}
|
||||
},
|
||||
"!ipfstorrent": {
|
||||
"usage": "",
|
||||
"description": "How Is LBRY Different from IPFS/BitTorrent?",
|
||||
"operation": "send",
|
||||
"bundle": {
|
||||
"url": "",
|
||||
"title": "",
|
||||
"description": "If you are interested in how LBRY is different from IPFS or BitTorrent, check out [lbry.io/faq/different-ipfs](https://lbry.io/faq/different-ipfs)",
|
||||
"color": 7976557,
|
||||
"author": {
|
||||
"name": "How Is LBRY Different from IPFS/BitTorrent?",
|
||||
"url": "https://lbry.io/faq/different-ipfs",
|
||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
||||
}
|
||||
}
|
||||
},
|
||||
"!shapeshift": {
|
||||
"usage": "",
|
||||
"description": "How Can I Convert My Crypto into LBC?",
|
||||
"operation": "send",
|
||||
"bundle": {
|
||||
"url": "",
|
||||
"title": "",
|
||||
"description": "Please see this guide on how to convert your crypto into LBC: [lbry.io/faq/shapeshift](https://lbry.io/faq/shapeshift)",
|
||||
"color": 7976557,
|
||||
"author": {
|
||||
"name": "How Can I Convert My Crypto into LBC?",
|
||||
"url": "https://lbry.io/faq/shapeshift",
|
||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
||||
}
|
||||
}
|
||||
},
|
||||
"!youtube": {
|
||||
"usage": "",
|
||||
"description": "What Is YouTube Sync?",
|
||||
"operation": "send",
|
||||
"bundle": {
|
||||
"url": "",
|
||||
"title": "",
|
||||
"description": "Please see this guide on how YouTube sync works: [lbry.io/faq/youtube](https://lbry.io/faq/youtube)",
|
||||
"color": 7976557,
|
||||
"author": {
|
||||
"name": "What Is YouTube Sync?",
|
||||
"url": "https://lbry.io/faq/youtube",
|
||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
||||
}
|
||||
}
|
||||
},
|
||||
"!transactions": {
|
||||
"usage": "",
|
||||
"description": "What Types of LBRY Transactions Are There?",
|
||||
"operation": "send",
|
||||
"bundle": {
|
||||
"url": "",
|
||||
"title": "",
|
||||
"description": "Please see this guide on [transaction types](https://lbry.io/faq/transaction-types)",
|
||||
"color": 7976557,
|
||||
"author": {
|
||||
"name": "What Types of LBRY Transactions Are There?",
|
||||
"url": "https://lbry.io/faq/transaction-types",
|
||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
||||
}
|
||||
}
|
||||
},
|
||||
"!team": {
|
||||
"usage": "",
|
||||
"description": "Meet the Team!",
|
||||
"operation": "send",
|
||||
"bundle": {
|
||||
"url": "",
|
||||
"title": "",
|
||||
"description": "Get to know the [Official Team](https://lbry.io/team) behind the scenes of LBRY Inc.",
|
||||
"color": 7976557,
|
||||
"author": {
|
||||
"name": "Meet the Team!",
|
||||
"url": "https://lbry.io/team",
|
||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
||||
}
|
||||
}
|
||||
},
|
||||
"!phone": {
|
||||
"usage": "",
|
||||
"description": "Phone Verification!",
|
||||
"operation": "send",
|
||||
"bundle": {
|
||||
"url": "",
|
||||
"title": "",
|
||||
"description": "[Phone number](https://lbry.io/faq/phone) verification provides another method for LBRY users to participate in the Rewards program",
|
||||
"color": 7976557,
|
||||
"author": {
|
||||
"name": "Phone Verification!",
|
||||
"url": "https://lbry.io/faq/phone",
|
||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
||||
}
|
||||
}
|
||||
},
|
||||
"!basic": {
|
||||
"usage": "",
|
||||
"description": "LBRY App Basics!",
|
||||
"operation": "send",
|
||||
"bundle": {
|
||||
"url": "",
|
||||
"title": "",
|
||||
"description": "[LBRY App Basics](https://lbry.io/faq/lbry-basics) The purpose of this FAQ is to answer questions about some of the basic functionality available in the LBRY app",
|
||||
"color": 7976557,
|
||||
"author": {
|
||||
"name": "LBRY App Basics!",
|
||||
"url": "https://lbry.io/faq/lbry-basics",
|
||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
||||
}
|
||||
}
|
||||
},
|
||||
"!shop": {
|
||||
"usage": "",
|
||||
"description": "The LBRY Inc. Shop!",
|
||||
"operation": "send",
|
||||
"bundle": {
|
||||
"url": "",
|
||||
"title": "",
|
||||
"description": "Visit our at-cost [merchandise store](https://shop.lbry.io) to check out the latest LBRY swag.",
|
||||
"color": 7976557,
|
||||
"author": {
|
||||
"name": "The LBRY Inc. Shop!",
|
||||
"url": "https://shop.lbry.io",
|
||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
||||
}
|
||||
}
|
||||
},
|
||||
"!content": {
|
||||
"usage": "",
|
||||
"description": "What Content Can I legally Upload to LBRY?",
|
||||
"operation": "send",
|
||||
"bundle": {
|
||||
"url": "",
|
||||
"title": "",
|
||||
"description": "[Read our FAQ](https://lbry.io/faq/content) to learn more about LBRY's content policy.",
|
||||
"color": 7976557,
|
||||
"author": {
|
||||
"name": "What Content Can I legally Upload to LBRY?",
|
||||
"url": "https://lbry.io/faq/content",
|
||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
||||
}
|
||||
}
|
||||
},
|
||||
"!aup": {
|
||||
"usage": "",
|
||||
"description": "Acceptable Use Policy",
|
||||
"operation": "send",
|
||||
"bundle": {
|
||||
"url": "",
|
||||
"title": "",
|
||||
"description": "[Read Our FAQ](https://lbry.io/faq/acceptable-use-policy) to learn more about LBRY's Acceptable Use Policy",
|
||||
"color": 7976557,
|
||||
"author": {
|
||||
"name": "Acceptable Use Policy",
|
||||
"url": "https://lbry.io/faq/acceptable-use-policy",
|
||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
||||
}
|
||||
}
|
||||
},
|
||||
"!meet": {
|
||||
"usage": "",
|
||||
"description": "Wanna Meet Up?",
|
||||
"operation": "send",
|
||||
"bundle": {
|
||||
"url": "",
|
||||
"title": "",
|
||||
"description": "LBRY is looking for ambassadors to spread the word to [College campuses](https://lbry.io/college) and [Meetup](https://lbry.io/meet) groups worldwide! ",
|
||||
"color": 7976557,
|
||||
"author": {
|
||||
"name": "Wanna Meet Up?",
|
||||
"url": "https://lbry.io/meet",
|
||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
||||
}
|
||||
}
|
||||
},
|
||||
"!alpha": {
|
||||
"usage": "",
|
||||
"description": "Android Alpha Tester",
|
||||
"operation": "send",
|
||||
"bundle": {
|
||||
"url": "",
|
||||
"title": "",
|
||||
"description": "Sign up to become an alpha tester for our [Android app](https://lbry.io/android-alpha)!",
|
||||
"color": 7976557,
|
||||
"author": {
|
||||
"name": "Android Alpha Tester",
|
||||
"url": "https://lbry.io/android-alpha",
|
||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
||||
}
|
||||
}
|
||||
},
|
||||
"!jiggytom": {
|
||||
"usage": "",
|
||||
"description": "What is JiggyTom?",
|
||||
"operation": "send",
|
||||
"bundle": {
|
||||
"url": "",
|
||||
"title": "",
|
||||
"description":
|
||||
"[JiggyTom](https://spee.ch/5/jiggytomsuperhero.jpeg) is LBRY's very own superhero. He has special powers which enable him to seek out and fix almost any issue that might occur within planet LBRY. \n\nUse JiggyTom with care. Overuse may result in unforeseen consequences and a meltdown which could lead to thermonuclear LBRYian war. \n\nMake sure you show your appreciation for Jiggy and his team of superheros when they use superpowers to help you. And remember kids, stay safe and behave yourselves",
|
||||
"color": 7976557,
|
||||
"author": {
|
||||
"name": "What is JiggyTom?",
|
||||
"url": "https://en.wikipedia.org/wiki/Superhero",
|
||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
||||
}
|
||||
}
|
||||
},
|
||||
"!tipbot": {
|
||||
"usage": "",
|
||||
"description": "Tipbot Help Message",
|
||||
"operation": "send",
|
||||
"bundle": {
|
||||
"url": "",
|
||||
"title": "",
|
||||
"description": "Type `!tip help` to interact with our Tipbot which can be used to send and receive LBRY Credits (LBC). <#369896313082478594> should be used to talk to bots in order to avoid spamming other channels. \nRead our [Tipbot FAQ](https://lbry.io/faq/tipbot-discord) on how use the LBRY Discord Tipbot",
|
||||
"color": 7976557,
|
||||
"author": {
|
||||
"name": "Tipbot Help Message",
|
||||
"url": "",
|
||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
10
config/default.example.json
Normal file
10
config/default.example.json
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"Wunderbot": {
|
||||
"dbUrl": "mongodb://localhost:27017",
|
||||
"dbName": "wunderbot",
|
||||
"token": "**********************************************",
|
||||
"owner": "132434059270815744",
|
||||
"defaultPrefix": ".w",
|
||||
"logLevel": "silly"
|
||||
}
|
||||
}
|
|
@ -1,101 +0,0 @@
|
|||
{
|
||||
// Bot configuration
|
||||
"bot": {
|
||||
"token": "discordbottoken",
|
||||
"prefix": "!",
|
||||
"debug": false
|
||||
},
|
||||
"moderation": {
|
||||
"perms": ["Moderator Team","LBRY TEAM"], // Roles that have access to all commands.
|
||||
"logchannel": "371620338263523328" // Channel to log the bots moderation..
|
||||
},
|
||||
//define channels for Commands.js usage
|
||||
"Channels": {
|
||||
"verification": "363050496023592961",
|
||||
"mining": "363049669636390913",
|
||||
"random": "363084227518136322",
|
||||
"content": "377938982111019010"
|
||||
},
|
||||
"speechbot": {
|
||||
"channels": [
|
||||
"363089721313722387",
|
||||
"363085078403874823",
|
||||
"363086945976320010",
|
||||
"363086925428555776",
|
||||
"363086752518242308",
|
||||
"369896313082478594",
|
||||
"363087606239461377",
|
||||
"363088045366312962",
|
||||
"363084227518136322",
|
||||
"363084262028607488",
|
||||
"371620338263523328"
|
||||
], // Channels speech bot is allowed to post in
|
||||
"mainchannel": "363085078403874823" // Main Speech Bot channel for directing with help message
|
||||
},
|
||||
"pricebot": {
|
||||
"channels": [
|
||||
"363050205043621908",
|
||||
"369896313082478594",
|
||||
"371620338263523328"
|
||||
], // Chanels price bot is allowed to post in
|
||||
"mainchannel": "363050205043621908" // Main Price Bot channel for directing with help message
|
||||
},
|
||||
"gitrelease": {
|
||||
"channel": "370779899650375681" // Channel to send release info to using <!releasenotes post>
|
||||
},
|
||||
"spamdetection": {
|
||||
"channels": [
|
||||
"363089721313722387",
|
||||
"363044238486798336",
|
||||
"363086719391629326",
|
||||
"363044275363119105",
|
||||
"363044260938776576",
|
||||
"372067478542745601",
|
||||
"369896313082478594",
|
||||
"371620338263523328"
|
||||
], // Channels excluded from Spam Detection
|
||||
"users": [
|
||||
"244245498746241025"
|
||||
] // Users to exclude from Spam Detection (include other bots here)
|
||||
},
|
||||
"hashbot": {
|
||||
"channels": [
|
||||
"363049669636390913",
|
||||
"369896313082478594",
|
||||
"371620338263523328"
|
||||
], // Channels Hash Bot is allowed to post in
|
||||
"mainchannel": "363049669636390913" // Main Hash Bot channel for directing with help message
|
||||
},
|
||||
"statsbot": {
|
||||
"channels": [
|
||||
"363050205043621908",
|
||||
"369896313082478594",
|
||||
"371620338263523328"
|
||||
], // Channels Stats Bot is allowed to post in
|
||||
"mainchannel": "363050205043621908" // Main Stats Bot channel for directing with help message
|
||||
},
|
||||
"rolelist": {
|
||||
// The roles here are Case Sensitive to how they are in your Discord Server!
|
||||
"baserole": "LBRYian",
|
||||
"allowedroles": ["NSFW", "Marketers", "Miners", "Off-Topic Chats", "International", "Dev"]
|
||||
},
|
||||
"claimbot": {
|
||||
"channels": [
|
||||
"377938982111019010"
|
||||
]
|
||||
},
|
||||
"mongodb": {
|
||||
"url": "mongodb://HOST:PORT/DATABASE"
|
||||
},
|
||||
"irc": {
|
||||
"nickname": "nick",
|
||||
"server": "chat.freenode.net",
|
||||
"discordToken": "tokenhere",
|
||||
"autoSendCommands": [
|
||||
["PRIVMSG", "NickServ", "IDENTIFY password"]
|
||||
],
|
||||
"channelMapping": {
|
||||
"#shared": "#lbry"
|
||||
}
|
||||
}
|
||||
}
|
0
logs/.gitkeep
Normal file
0
logs/.gitkeep
Normal file
74
package.json
74
package.json
|
@ -1,39 +1,39 @@
|
|||
{
|
||||
"dependencies": {
|
||||
"babel-cli": "^6.26.0",
|
||||
"babel-preset-node8": "^1.2.0",
|
||||
"bitcoin": "^3.0.1",
|
||||
"chrono-node": "^1.3.5",
|
||||
"config": "^1.30.0",
|
||||
"discord.js": "^11.3.2",
|
||||
"elmadev-discord-irc": "^2.4.1",
|
||||
"embed-creator": "^1.2.3",
|
||||
"jsonpath": "^1.0.0",
|
||||
"moment": "^2.21.0",
|
||||
"mongoose": "^4.13.12",
|
||||
"needle": "^2.0.1",
|
||||
"node-config": "^0.0.2",
|
||||
"numeral": "^2.0.6",
|
||||
"request": "^2.85.0",
|
||||
"sleep": "^5.1.1",
|
||||
"wget": "^0.0.1"
|
||||
},
|
||||
"scripts": {
|
||||
"prettier": "prettier --write \"{bot,.}/**/*.{js,json}\" --single-quote --print-width 240",
|
||||
"build": "babel bot -d dist",
|
||||
"prod": "babel bot -d dist & node dist/bot.js",
|
||||
"lint": "prettier --write \"{bot,.}/**/*.{js,json}\" --single-quote --print-width 240",
|
||||
"precommit": "prettier --write \"{bot,.}/**/*.{js,json}\" --single-quote --print-width 240"
|
||||
},
|
||||
"devDependencies": {
|
||||
"husky": "^0.14.3",
|
||||
"prettier": "1.8.1"
|
||||
},
|
||||
"name": "wunderbot-discord",
|
||||
"version": "0.0.1",
|
||||
"description": "LBRYs bot for Discord",
|
||||
"main": "app.js",
|
||||
"repository": "https://github.com/filipnyquist/wunderbot-disc",
|
||||
"author": "filipnyquist <filip@lbry.io>",
|
||||
"license": "MIT"
|
||||
"dependencies": {
|
||||
"commando-provider-mongo": "^1.2.1",
|
||||
"config": "^1.30.0",
|
||||
"discord.js": "^11.2.1",
|
||||
"discord.js-commando": "^0.10.0",
|
||||
"mongodb": "^3.1.0-beta4",
|
||||
"request": "^2.86.0",
|
||||
"request-promise-cache": "^1.1.1"
|
||||
},
|
||||
"name": "wunderbot",
|
||||
"version": "0.0.1",
|
||||
"description": "A discord.js bot, next-gen with a webinterface",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"build": "babel ./src --experimental --source-maps-inline -d ./dist",
|
||||
"lint": "eslint ./src",
|
||||
"start": "nodemon ./src/index.js --exec babel-node",
|
||||
"debug": "nodemon ./src/index.js --inspect-brk=41000 --exec babel-node"
|
||||
},
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@babel/cli": "7.0.0-beta.44",
|
||||
"@babel/core": "7.0.0-beta.44",
|
||||
"@babel/node": "7.0.0-beta.44",
|
||||
"@babel/preset-env": "7.0.0-beta.44",
|
||||
"babel-eslint": "^8.1.2",
|
||||
"eslint": "^4.14.0",
|
||||
"eslint-config-airbnb-base": "^12.1.0",
|
||||
"eslint-config-prettier": "^2.9.0",
|
||||
"eslint-plugin-import": "^2.8.0",
|
||||
"nodemon": "^1.14.8",
|
||||
"prettier-eslint": "^8.7.0"
|
||||
},
|
||||
"repository": "https://github.com/lbryio/lbry-wunderbot",
|
||||
"author": "Filip Nyquist <filip@lbry.io>",
|
||||
"contributors": [],
|
||||
"private": false
|
||||
}
|
||||
|
|
88
src/bot.js
Normal file
88
src/bot.js
Normal file
|
@ -0,0 +1,88 @@
|
|||
import commando from "discord.js-commando";
|
||||
import path from "path";
|
||||
import config from "config";
|
||||
import { oneLine } from "common-tags";
|
||||
import { MongoClient } from "mongodb";
|
||||
import MongoDBProvider from "commando-provider-mongo";
|
||||
import requestCacheSupport from "request-promise-cache";
|
||||
import checkCustomCommands from "./helpers/customCommands";
|
||||
|
||||
module.exports = class Wunderbot extends commando.Client {
|
||||
constructor() {
|
||||
super({
|
||||
owner: config.get("Wunderbot.owner"),
|
||||
commandPrefix: config.get("Wunderbot.defaultPrefix")
|
||||
});
|
||||
// Add our own version of request with cache support :)
|
||||
this.request = requestCacheSupport;
|
||||
// ADD our custom commands helper :)
|
||||
this.on("message", msg => {
|
||||
checkCustomCommands(msg, this);
|
||||
});
|
||||
this.on("error", console.error)
|
||||
.on("warn", console.warn)
|
||||
// .on("debug", console.log)
|
||||
.on("ready", () => {
|
||||
console.log(`## ## ## ## ## ## ######## ######## ######## ######## ####### ########
|
||||
## ## ## ## ## ### ## ## ## ## ## ## ## ## ## ## ##
|
||||
## ## ## ## ## #### ## ## ## ## ## ## ## ## ## ## ##
|
||||
## ## ## ## ## ## ## ## ## ## ###### ######## ######## ## ## ##
|
||||
## ## ## ## ## ## #### ## ## ## ## ## ## ## ## ## ##
|
||||
## ## ## ## ## ## ### ## ## ## ## ## ## ## ## ## ##
|
||||
### ### ####### ## ## ######## ######## ## ## ######## ####### ##
|
||||
|
||||
`);
|
||||
console.log(
|
||||
`Client ready; logged in as ${this.user.username}#${this.user.discriminator} (${this.user.id})`
|
||||
);
|
||||
})
|
||||
.on("disconnect", () => {
|
||||
console.warn("Disconnected!");
|
||||
})
|
||||
.on("reconnecting", () => {
|
||||
console.warn("Reconnecting...");
|
||||
})
|
||||
.on("commandError", (cmd, err) => {
|
||||
if (err instanceof commando.FriendlyError) return;
|
||||
console.error(`Error in command ${cmd.groupID}:${cmd.memberName}`, err);
|
||||
})
|
||||
.on("commandBlocked", (msg, reason) => {
|
||||
console.log(oneLine`
|
||||
Command ${msg.command ? `${msg.command.groupID}:${msg.command.memberName}` : ""}
|
||||
blocked; ${reason}
|
||||
`);
|
||||
})
|
||||
.on("commandPrefixChange", (guild, prefix) => {
|
||||
console.log(oneLine`
|
||||
Prefix ${prefix === "" ? "removed" : `changed to ${prefix || "the default"}`}
|
||||
${guild ? `in guild ${guild.name} (${guild.id})` : "globally"}.
|
||||
`);
|
||||
})
|
||||
.on("commandStatusChange", (guild, command, enabled) => {
|
||||
console.log(oneLine`
|
||||
Command ${command.groupID}:${command.memberName}
|
||||
${enabled ? "enabled" : "disabled"}
|
||||
${guild ? `in guild ${guild.name} (${guild.id})` : "globally"}.
|
||||
`);
|
||||
})
|
||||
.on("groupStatusChange", (guild, group, enabled) => {
|
||||
console.log(oneLine`
|
||||
Group ${group.id}
|
||||
${enabled ? "enabled" : "disabled"}
|
||||
${guild ? `in guild ${guild.name} (${guild.id})` : "globally"}.
|
||||
`);
|
||||
});
|
||||
|
||||
this.setProvider(
|
||||
MongoClient.connect(config.get("Wunderbot.dbUrl"), { useNewUrlParser: true }).then(
|
||||
client => new MongoDBProvider(client.db(config.get("Wunderbot.dbName")))
|
||||
)
|
||||
).catch(console.error);
|
||||
this.registry
|
||||
.registerDefaults()
|
||||
.registerTypesIn(path.join(__dirname, "types"))
|
||||
.registerCommandsIn(path.join(__dirname, "commands"));
|
||||
// .registerGroup("util", "Utility");
|
||||
this.login(config.get("Wunderbot.token"));
|
||||
}
|
||||
};
|
42
src/commands/util/user.info.js
Normal file
42
src/commands/util/user.info.js
Normal file
|
@ -0,0 +1,42 @@
|
|||
const { stripIndents } = require("common-tags");
|
||||
const commando = require("discord.js-commando");
|
||||
|
||||
module.exports = class UserInfoCommand extends commando.Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: "user-info",
|
||||
aliases: ["user", "🗒"],
|
||||
group: "util",
|
||||
memberName: "user-info",
|
||||
description: "Gets information about a user.",
|
||||
examples: ["user-info @Crawl#3208", "user-info Crawl"],
|
||||
guildOnly: true,
|
||||
|
||||
args: [
|
||||
{
|
||||
key: "member",
|
||||
label: "user",
|
||||
prompt: "What user would you like to snoop on?",
|
||||
type: "member"
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
async run(msg, { member }) {
|
||||
const { user } = member;
|
||||
return msg.reply(stripIndents`
|
||||
Info on **${user.username}#${user.discriminator}** (ID: ${user.id})
|
||||
|
||||
**❯ Member Details**
|
||||
${member.nickname !== null ? ` • Nickname: ${member.nickname}` : " • No nickname"}
|
||||
• Roles: ${member.roles.map(roles => `\`${roles.name}\``).join(", ")}
|
||||
• Joined at: ${member.joinedAt}
|
||||
|
||||
**❯ User Details**
|
||||
• Created at: ${user.createdAt}${user.bot ? "\n • Is a bot account" : ""}
|
||||
• Status: ${user.presence.status}
|
||||
• Game: ${user.presence.game ? user.presence.game.name : "None"}
|
||||
`);
|
||||
}
|
||||
};
|
11
src/helpers/customCommands.js
Normal file
11
src/helpers/customCommands.js
Normal file
|
@ -0,0 +1,11 @@
|
|||
import Discord from "discord.js";
|
||||
|
||||
module.exports = async function checkCustomCommand(msg, client) {
|
||||
if (!msg.guild && !msg.author.bot) return;
|
||||
const custmcmds = await msg.guild.settings.get("custmcmds", {});
|
||||
Object.keys(custmcmds).forEach(cmd => {
|
||||
if (msg.content.toLowerCase().indexOf(cmd.toLowerCase()) >= 0 && custmcmds[cmd].operation === "send") {
|
||||
msg.channel.send("", new Discord.RichEmbed(custmcmds[cmd].bundle));
|
||||
}
|
||||
});
|
||||
};
|
3
src/index.js
Normal file
3
src/index.js
Normal file
|
@ -0,0 +1,3 @@
|
|||
import Wunderbot from "./bot";
|
||||
|
||||
const wunderbot = new Wunderbot();
|
Loading…
Add table
Reference in a new issue