discord bot in php
Go to file
Ben Harris 42b38721ef add jokes from file 2017-03-18 12:32:12 -04:00
img bamboozle 2017-03-14 13:00:59 -04:00
.gitignore ev_stuff 2017-03-16 14:39:40 -04:00
README.md update README 2017-03-16 15:32:00 -04:00
bot redid ;help 2017-03-16 03:01:59 -04:00
bot.php add jokes from file 2017-03-18 12:32:12 -04:00
composer.json guzzle cleverbot 2017-03-16 14:13:28 -04:00
composer.lock updated composer.lock 2017-03-16 16:13:03 -04:00
definitions.php save time location 2017-03-15 21:24:24 -04:00
kaomoji.php redid ;help 2017-03-16 03:01:59 -04:00
miscjokes.txt add jokes from file 2017-03-18 12:32:12 -04:00
phpbot.todo dbg fn 2017-03-14 15:23:42 -04:00
util_fns.php clean out old shit 2017-03-16 16:09:17 -04:00
yomamajokes.txt add jokes from file 2017-03-18 12:32:12 -04:00

README.md

testcord

Add phpbot to your server

This is a discord bot I've been working on. Under heavy development.

Feel free to clone this project and try your hand at making a bot.

Set up

  1. git clone https://github.com/benharri/testcord && cd testcord
  2. Install DiscordPHP and dependencies composer install
  3. Get your Discord API Key and save it in env_stuff.php
  4. --optional save your API keys in env_stuff.php for openweathermap.org, cleverbot.io, and a phone number for the text command
  5. Run the bot ./bot start

If you want to keep the bot running in the background, run it as ./bot nohup

If bash isn't available, you can run the bot with just php bot.php

Commands

  • benbot - a bot made by benh. avatar by hirose.

  • ;time <@user> - looks up current time for yourself or another user

  • ;weather <city|@user> - looks up weather for a city, other user, or yourself

  • ;roll <number of sides> - rolls an n-sided die. defaults to 6.

  • ;text_benh <message> - text a message to benh

  • ;avatar <@user> - gets the avatar for a user

  • ;set <this> <that> - sets this to that ;get <thing to get> - gets a value from the definitions. you can also omit - get (;<thing to get>)

  • ;unset <def to remove> - removes a definition

  • ;8ball <question to ask the mighty 8ball> - tells your fortune

  • ;kaomoji <sad|happy|angry|confused|surprised> - sends random kaomoji

  • ;joke <chucknorris|yomama|dad> - tells a random joke

  • ;block <msg> - turn a message into block text

  • ;img <image to show> - image tools (;help img for more info)

  • ; <msg> - talk to ben (you can do this in a DM with me too!)

  • ;help <command> - get more information about a specific command

  • commands will still work if the first letter is capitalized.