Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,5 @@ Commandes
- If a message contains `http://onlywat.ch`, the bot sends the same gif as above.
- `!ow.timeleft` shows the remaining time before [Overwatch](https://playoverwatch.com/en-us/)'s launch.
- `!dice 1d20+5` is a RPG tool to throw dice. You can use shortcuts like `!dice 20+3` (⇔ `!dice 1d20+3`) or `!dice 18` (⇔ `!dice 1d18+0`)
- `!nms.timeleft` shows the remaining time before [No Man's Sky](http://www.no-mans-sky.com/)'s launch.
- `!nms.timeleft` shows the remaining time before [No Man's Sky](http://www.no-mans-sky.com/)'s launch.
- `!prepareyouranus` or `!beprepared` sends a link to [this image](http://memestorage.com/_nw/22/79844313.jpg).
1 change: 1 addition & 0 deletions bot.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@
new MessageHandler\OverwatchTimeleft(),
new MessageHandler\Propre(),
new MessageHandler\NomanskyTimeleft(),
new MessageHandler\BePrepared(),
]
))->run();
24 changes: 12 additions & 12 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 34 additions & 0 deletions src/Handler/BePrepared.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?php
namespace ModnarLluf\DiscBot\Handler;

use ModnarLluf\DiscBot\MessageHandler;

/**
* Class NomanskyTimeleft
* @package ModnarLluf\DiscBot\Handler
* @author Florian Rosito <[email protected]>
*/
class BePrepared implements MessageHandler
{
const URL = 'http://memestorage.com/_nw/22/79844313.jpg';

/**
* @param $message
* @return bool
*/
public function handle($message)
{
$message->channel->sendMessage(self::URL);

return true;
}

/**
* @param $message
* @return bool
*/
static public function isHandlingMessage($message)
{
return $message->content === '!prepareyouranus' || $message->content === '!beprepared';
}
}