forked from miguel456/luke-bot
Added "Gimme" command
The Gimme command allows you to get stuff from various places Also removed MinecraftInfo and Playback commands.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace nogueiracodes\RaspberryBot\Bot\Commands;
|
||||
|
||||
@@ -18,6 +18,7 @@ class Help implements Command
|
||||
public function run(array $parameters)
|
||||
{
|
||||
|
||||
// This could be a little cleaner.
|
||||
switch($parameters['section'])
|
||||
{
|
||||
case "commands":
|
||||
@@ -31,7 +32,20 @@ class Help implements Command
|
||||
return ":x: There is currently no available help.";
|
||||
}
|
||||
|
||||
break;
|
||||
break;
|
||||
|
||||
case "fun":
|
||||
|
||||
if(file_exists(PROJECT_ROOT . "/Commandfiles/fun.txt"))
|
||||
{
|
||||
return str_replace("<prefix>", $_ENV['COMMAND_PREFIX'], file_get_contents(PROJECT_ROOT . "/Commandfiles/fun.txt"));
|
||||
}
|
||||
else
|
||||
{
|
||||
return ":x: There is currently no available help.";
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
return ":x: There is no help section named " . $parameters['section'] . ".";
|
||||
|
Reference in New Issue
Block a user