DiscordAPI for PocketMine-MP plugins
use io\enn3\discordapi\DiscordAPI;
variable |
type |
call |
username |
string |
Username your Bot |
webhook_api |
string |
Get From Server |
private $bot;
public function onEnable(): void{
$this->getServer()->getPluginManager()->registerEvents($this, $this);
$this->bot = new DiscordAPI("UsernameBot", "WEBHOOK_API");
}
variable |
type |
call |
content |
string |
Message/text |
username |
string |
UsernameBot |
private $bot;
public function onEnable(): void{
$this->getServer()->getPluginManager()->registerEvents($this, $this);
$this->bot = new DiscordAPI("UsernameBot", "WEBHOOK_API");
$this->bot->sendMessage("Hello there!");
}