This package is not auto-updated.
Last update: 2020-01-24 16:44:51 UTC
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
- 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.
php composer.phar install
- 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
See info about the bot's current servers:
php utils/debug-info.php [discord_token]