Discord API 1.0.2

License Agreement
Freie Lizenz
Website
https://hanashi.dev
Supported Versions
WoltLab Suite 3.0
WoltLab Suite 3.1

This plugin serves as an interface between other plugins and your Discord server. This plugin is especially relevant for developers. It can also be used as a base plugin for other plugins.

Different bots can be created, which can then be accessed by other plugins.

Questions and Answers

How do I create a Bot?

Go to ACP -> Configuration -> Discord -> Discord Bots -> Add Discord-Bot.

How can I implement to my Plugin?

Add the dependency to this plugin to your package.xml::

Code
  1. <requiredpackage minversion="1.0.0">dev.hanashi.wsc.discord-api</requiredpackage>

Create a bot in the ACP. This gets an ID. Using the following code you can use the API:

Code
  1. $discord = wcf\system\discord\DiscordApi::getApiByID($botID);

The $botID has to be changed, of course.

Now you can communicate with Discord. Here is an example to get a channel:

Code
  1. $discord->getChannel($channelID);


  • Version 1.0.2

    FEATURE: Neuer Discord-Type hinzugefügt wcf\system\discord\type\RoleMultiSelectDiscordType

  • Version 1.0.1

    • internal changes