WoltLab Cloud Discord API 2.2.0

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::

<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:

$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:

  • Version 2.2.0

    • FEATURE: new Application Command API functions
    • FEATURE: new Auto Moderation API functions
    • FEATURE: new Forum API functions
    • FEATURE: addition of existing API functions
  • Version 2.1.1

    • FIX: Embed Color Option had problems in live mode
  • Version 2.1.0

    • FEATURE: Added methods for stickers
    • FEATURE: Added methods for Scheduled Events
    • FEATURE: Added method for crosspost
    • FEATURE: Added DiscordEmbedColorOptionType
  • Version 2.0.4

    • FIX: resolves installation problem with primary key
  • Version 2.0.3

    • CHANGE: number of characters for prefix increased to 100
    • CHANGE: removed unnecessary uses
  • Version 2.0.2

    • FIX: Problem fixed when an OptionType is used multiple times
  • Version 2.0.1

    • FIX: fixes problem when Discord API is offline or there is no connection
  • Version 2.0.0

    Attention: At least WoltLab Suite 5.3 is now required.

    • CHANGE: Change to TypeScript
    • CHANGE: Change to Database PHP API
    • CHANGE: Change to Guzzle HTTP
    • CHANGE: Bot token and secret key is no longer displayed in ACP when editing bot
    • CHANGE: Webhook image files are now stored as .png and no longer as .pic
    • CHANGE: methods renamed
      • addPinnedChannelMessage renamed to pinMessage
      • deletePinnedChannelMessage renamed to unpinMessage
      • deleteIntegration renamed to deleteGuildIntegration
    • CHANGE: Methods removed
      • syncGuildIntegration was removed
      • getGuildEmbed was removed
      • modifyGuildEmbed was removed
    • FEATURE: New methods added
    • FEATURE: Improvement of group selection (e.g. for Discord sync)
    • FEATURE: Added public key for Interaction API in ACP
    • FEATURE: AbstractDiscordInteractionAction added for Interaction API
  • Version 1.0.8

    • CHANGE: change to PSR-12
  • Version 1.0.7

    • FIX: Error message in case of incorrect API response
  • Ich habe es nicht so mit Discord, für meine Communty ist derzeit ein Plan, Das von Kalender Termine in denn Termin Channel im Discord gepostet werden soll, ich hatte angenommen das ich das mit einem Discord bot machen kann.

    Leider stoße ich auf Probleme denn Bot in denn Discord einzubauen.

    Wozu soll Bot-Token dienen?

    Und warum findet der Bot obwohl Server ID angabe keinen Zugriff auf denn Discord Server?

  • Tolle gut dokumentierte API

    Diese Erweiterung ist toll und gut dokumentiert, genau wie man es von Hanashi's Erweiterungen gewohnt ist.