update sys and hangman

This commit is contained in:
Ben Harris 2017-05-18 17:44:15 -04:00
parent 02431357a4
commit 7d66ad3b3f
5 changed files with 35 additions and 8 deletions

View File

@ -1,16 +1,16 @@
# benbot
[Add benbot to your server](https://discordapp.com/api/oauth2/authorize?client_id=288416337057939456&scope=bot&permissions=0)
[Add benbot to your server](https://discordapp.com/oauth2/authorize?client_id=288416337057939456&scope=bot&permissions=36826176)
This is a Discord bot I've been working on. Under heavy development. It's my senior project.
This is a Discord bot I've been working on. Under heavy development. It was my senior project.
Feel free to clone this project and try your hand at making a bot.
Feel free to clone or fork this project and try your hand at making a bot.
## Set up
> Requires PHP 7.0 or later (7.1.4 is preferred. it includes an important fix for SSL and sending files larger than 100kb)
1. `git clone https://git.benharris.ch/srproj/benbot && cd benbot`
1. `git clone https://git.benharr.is/srproj/benbot && cd benbot`
1. Install DiscordPHP and dependencies: `composer install`
1. Get your Discord API Key and save it in `.env` (copy or rename `.env.example` and paste your keys in)
1. --optional save your API keys in `.env` for openweathermap.org, cleverbot.com, and a phone number for the text command

View File

@ -102,4 +102,20 @@ pan over to poop emoji
:unamused: < I'm positively euphoric right now...
:musical_note: EXPRESS YA SELF :musical_note:
---
I sexually Identify as an Attack Helicopter. Ever since I was a boy I dreamed of soaring over the oilfields dropping hot sticky loads on disgusting foreigners. People say to me that a person being a helicopter is Impossible and Im fucking retarded but I dont care, Im beautiful. Im having a plastic surgeon install rotary blades, 30 mm cannons and AMG-114 Hellfire missiles on my body. From now on I want you guys to call me “Apache” and respect my right to kill from above and kill needlessly. If you cant accept me youre a heliphobe and need to check your vehicle privilege. Thank you for being so understanding.
I sexually Identify as an Attack Helicopter. Ever since I was a boy I dreamed of soaring over the oilfields dropping hot sticky loads on disgusting foreigners. People say to me that a person being a helicopter is Impossible and Im fucking retarded but I dont care, Im beautiful. Im having a plastic surgeon install rotary blades, 30 mm cannons and AMG-114 Hellfire missiles on my body. From now on I want you guys to call me “Apache” and respect my right to kill from above and kill needlessly. If you cant accept me youre a heliphobe and need to check your vehicle privilege. Thank you for being so understanding.
---
I sexually identify as a single, Pringle, ready to mingle. Ever since I was a potato I dreamed of being thin sliced, covered in disgusting oil then heated in a medium oven until reaching climax at the micro second of golden-browness. People bully me, and say things like "what the fuck, you aren't a Pringle", but I know deep down they are just jealous of my inner beauty. I have already started hiding in cylinders all day, and now im improving my crunchiness by regularly burning my sides on the stove. I want you guys to respect my natural ability to instantly satisfy low salt carb cravings, and if you don't you are oppressing me, and you should check your diabetes type. Thank you for being so understanding.
---
hi every1 im new!!!!!!! holds up spork my name is katy but u can call me t3h PeNgU1N oF d00m!!!!!!!! lol…as u can see im very random!!!! thats why i came here, 2 meet random ppl like me … im 13 years old (im mature 4 my age tho!!) i like 2 watch invader zim w/ my girlfreind (im bi if u dont like it deal w/it) its our favorite tv show!!! bcuz its SOOOO random!!!! shes random 2 of course but i want 2 meet more random ppl =) like they say the more the merrier!!!! lol…neways i hope 2 make alot of freinds here so give me lots of commentses!!!! DOOOOOMMMM!!!!!!!!!!!!!!!! <--- me bein random again ^ hehe…toodles!!!!!
love and waffles, t3h PeNgU1N oF d00m
---
I zexuuhle ideentife uhz gruhph puhper. Ever zince i wuhz uh boe i dreuhmed of zortieng over de grid druhwieng beuhutiful gruhphz uh muhd homework. People zuhe to me duht uh perzuh beieng gruhph puhper iz impozzible uhnd i'm fuckieng retuhrded but i duh't cuhre, i'm beuhutiful. I'm huhvieng uh pluhztic zurgeuh tuhttoo rowz, columnz uhnd 3 hole punchez uh me bode. From now uh i wuhnt yu guez to cuhl me "grid" uhnd rezpect me right to druhw gruhphz uhnd zolve equuhtiuhz. If yu cuhn't uhccept me yu're uh puhperophobe uhnd need to check eowr gruhphieng privilege. Thuhnk yu for beieng zo underztuhndieng.
---
GREETINGS BATTLE BROTHERS I AM NEW. HOLDS UP BOLTER MY NAME IS SERGEANT ARGUS BUT YOU CAN CALL ME BATTLE BROTHER. AS YOU CAN SEE I AM VERY LOYAL TO THE EMPEROR. THAT IS WHY I HAVE COME HERE, TO MEET OTHER BATTLE BROTHERS WHO ARE LOYAL TO THE EMPEROR LIKE MYSELF. I AM 127 YEARS OF AGE ( PRAISE THE EMPEROR) I LIKE TO PURGE HERETICS AND XENO SCUM WITH MY BATTLE BROTHERS ( I LOVE MY BATTLE BROTHERS, IF YOU DO NOT LIKE THAT THE DEAL WITH IT) IT IS OUR FAVORITE ACTIVITY BECAUSE THEY ARE NOT LOYAL TO THE EMPEROR. ALL MY BATTLE BROTHERS ARE LOYAL TO THE EMPEROR TOO OF COURSE, BUT I WANT TO MEET MORE LOYAL SERVANTS OF THE EMPEROR. LIKE THE EMPEROR ONCE SAID, THE MORE THE MERRIER. I HOPE TO BOND WITH A LARGE AMOUNT OF LOYAL SERVANTS OF THE EMPEROR SO JOIN ME IN PRAISE OF THE EMPEROR. FAREWELL.
PRAISE THE EMPEROR
BATTLE BROTHER
---
What's this you've said to me, my good friend? Ill have you know I graduated top of my class in conflict resolution, and Ive been involved in numerous friendly discussions, and I have over 300 confirmed friends. I am trained in polite discussions and I'm the top mediator in the entire neighborhood. You are worth more to me than just another target. I hope we will come to have a friendship never before seen on this Earth. Don't you think you might be hurting someone's feelings saying that over the internet? Think about it, my friend. As we speak I am contacting my good friends across the USA and your P.O. box is being traced right now so you better prepare for the greeting cards, friend. The greeting cards that help you with your hate. You should look forward to it, friend. I can be anywhere, anytime for you, and I can calm you in over seven hundred ways, and that's just with my chess set. Not only am I extensively trained in conflict resolution, but I have access to the entire group of my friends and I will use them to their full extent to start our new friendship. If only you could have known what kindness and love your little comment was about to bring you, maybe you would have reached out sooner. But you couldn't, you didn't, and now we get to start a new friendship, you unique person. I will give you gifts and you might have a hard time keeping up. You're finally living, friend.

View File

@ -71,6 +71,7 @@ final class BenBot extends Discord
$msghandler = function ($msg) {
$str = s($msg->content);
if (!$msg->author->bot) {
// handle game move for players

View File

@ -5,6 +5,7 @@ namespace BenBot\Commands;
use BenBot\EmbedColors;
use BenBot\Utils;
use Carbon\Carbon;
use Discord\Helpers\Process;
use Discord\Parts\Embed\Embed;
final class Debug
@ -81,7 +82,12 @@ final class Debug
public static function sys($msg, $args)
{
if (Utils::getUserIDFromMsg($msg) == '193011352275648514') {
return '```'.shell_exec(implode(' ', $args)).'```';
$process = new Process(escapeshellcmd(implode(' ', $args)));
$process->start(self::$bot->loop);
$process->stdout->on('data', function ($chunk) use ($msg) {
Utils::send($msg, "```$chunk```");
});
} else {
return "**you're not allowed to use that command**";
}

View File

@ -157,9 +157,13 @@ final class Hangman
private static function showGameState($gameid)
{
$guesseds = self::$bot->hangman[$gameid]['guessed_letters'];
sort($guesseds);
$incorrects = array_diff($guesseds, array_unique(str_split(self::$bot->hangman[$gameid]['secret_word'])));
return '```'.self::$gallows[self::$bot->hangman[$gameid]['state']]."\n".
self::showSecretWord($gameid)."\n\n".
'Incorrect letters: '.implode(' ', array_diff(self::$bot->hangman[$gameid]['guessed_letters'], str_split(self::$bot->hangman[$gameid]['secret_word'])))."\n".
'Guessed letters:'.implode(' ', self::$bot->hangman[$gameid]['guessed_letters']).'```';
'Incorrect letters: '.implode(' ', $incorrects)."\n".
'Guessed letters:'.implode(' ', $guesseds.'```';
}
}