dholmes / discord-bot-builder
This package is abandoned and no longer maintained.
No replacement package was suggested.
There is no license information available for the latest version (dev-master) of this package.
dev-master
2016-10-28 07:57 UTC
Requires
- guzzlehttp/guzzle: 6.*
- symfony/debug: 3.*
- team-reflex/discord-php: 4.*
Requires (Dev)
- phake/phake: 2.*
- phpunit/phpunit: 5.*
This package is auto-updated.
Last update: 2020-11-03 11:28:09 UTC
README
A framework to help build a Discord bot and route incoming messages. Features include:
- Restrict commands to particular channels
- Restrict commands to particular roles
- Respond to various message properties only including:
- Private messages
- Mentions
- Messages containing particular phrases
- Messages from certain people
It's a work in progress, in particular it could do with a good DSL in front of the matchers in order make specifying a bot much prettier on the eyes.
Development
php composer.phar install
Running
See examples
- Create your bot on the Discord Developer Site
- Copy your bot client/application id
- Go to https://discordapp.com/oauth2/authorize?client_id=CLIENT_ID_GOES_HERE&scope=bot&permissions=0 You can set permissions for the bot here. Permissions can be found on the developer pages under permission.
- Select server and click authorize.
php examples/run.php [your_bot_token] [bot_client_id]
Included in the example is an upstart script. To run on a Ubuntu server:
cp examplebot.conf /etc/init
# Change paths in config to match your installation
vi /etc/init/examplebot.conf
sudo service examplebot restart
Running Tests
- All:
vendor/bin/phpunit
- Individual:
vendor/bin/phpunit tests/DiscordBotBuilder/Command/HelpCommandTest.php
Utils
See info about the bot's current servers:
php utils/debug-info.php [discord_token]