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:
2020-12-27 18:21:03 +00:00
parent 2a2d2a0b7e
commit 6021155289
10 changed files with 157 additions and 138 deletions

View File

@@ -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'] . ".";