428

Product support

Get help in the plugin support forum.

  • Added on May 3, 2017
  • Current version: 1.0.4
  • Platform Compatibility
    v3.x not tested
    v2.x not tested
    v1.x use latest
  • Created by
  • Public repository

Categories

Find this plugin on Github: https://github.com/JoJuhasz/codein-discord

Discord integration plugin for October CMS

Discord is an all-in-one voice and text chat for gamers that’s free, secure, and works on both desktop and mobile.

Features

  • Live preview of your Discord server with the "Discord App" component.
  • Login/Register to your website using a Discord account with "Login with Discord" component.
  • Allow your visitors to join your Discord server in one click with the "Join Discord Guild" component.

Dependencies

Troubleshooting

It appears some have problems when installing this plugin.
You can have a detail on the support forum. After some first investigations, this looks due to vendor packages dependencies.
If you want to help in researches, please join discussion in support forum.
First hotfix is to move plugin dependencies into main composer.json (in root folder), then composer update.

Prerequisites

Vendor credits

This plugin is using vendor packages, we thanks developers for making good work!

Donations

  • We want to keep this plugin free, you appreciate it? Consider making a small donation. Thanks!

About the author

Codein.be - Jonathan Juhasz
Web Developer for 10years+ and passionated by my work, i'm always trying to deliver quality products to the largest number.
Based in Belgium, we offer quality web development services for companies and individuals.

Example showing Website Integration, Console Gateway and Discord Client synchronized

Discord Application preparation

In order to use this plugin, you need to have your own Discord Server (aka "Guild") and your Discord App, with a Bot associated.

Discord Application configuration

Application name

Your application name is important, it is displayed on OAuth2.0 pages.
You have to choose a name corresponding to your website, in which your visitors will be confident.

Redirect URI(S)

When processing OAuth2.0 requests, your visitors will temporarily leave your website.
Don't worry ! Once authorization granted, the visitor will be redirected to a specific page of your website.
All the possible redirection URIs have to be communicated to Discord. If you don't specify the correct URIs here, you'll get an error when your visitors try to authenticate with Discord.
Required URIs
This is the required URIs that you need to encode:

Application description

Well, this is the application short description.

Application icon

The icon will be displayed on the authorization pages.
It'll also be used as the Bot avatar when writing messages.

Bot User configuration

Once your application created, the application page will reload.
You are now able to create a Bot user for your application by clicking the appropriate button "Create a bot user". After creating the bot, you now have access to all your application credentials.
Keep this page open, you will need these informations in your plugin configuration.

Plugin configuration

After installing the plugin, you can add Guilds and Bots in the backend area under the menu "Discord API".

  • A Guild (think as it as a server) is composed of a Guild ID, a name and a description.
    While the name and description are not important, the Guild ID is mandatory. You can find your Guild ID by going into the "Widget" tab of your server settings as the "Server Identifier (ID)".
  • A Bot is composed of a "Bot Name", a "Bot Token", a "Client ID" and a "Client Secret".
    You will find these informations on your Application page (described below).

Once the Guilds and Bots are configured, you are ready to add the plugin components on any page you want.

Discord permissions

In order to allow your Bot to fetch your Guild data, this one needs to be authorized on your Guild.
You can do this simply by clicking on the link "Add bot to server" on the bottom of the "Edit Bot" backend page.
The Bot will have full access to the Guild.
Anyway, only the channels that are accessible to @everyone role will be displayed.

Discord Gateway

Sending messages on Discord from the website is not possible by default.
In order to be authorized to send messages, you have to connect at least one time your bot to the guild.
This is the purpose of the Discord Gateway. This plugin comes with a custom artisan command, which can connect your bot to the Gateway.

php artisan discord:gateway:run --bot=ID --info --log
  • Bot option is the ID of the bot you want to connect to the Discord gateway.
  • Log option will enable all the logging and the output will be sent directly in your console.
  • Info option will enable some info logging when a message is sent.

Once you see your bot online, you're able to send messages from the website.
(Of course, don't forget to tick the component property allowing to send messages)

Styling

This plugin comes with a default .scss stylesheet and a compiled .css file.
The default HTML code is based on 'Bootstrap 4' but we will release in a near future a backward compatible update with a more compatible HTML code (anyway don't forget you can fork the components anytime).

1.0.4

Created table codein_discord_bots

May 03, 2017

1.0.3

Updated table codein_discord_guilds

May 03, 2017

1.0.2

Created table codein_discord_guilds

May 03, 2017

1.0.1

Initialize plugin.

May 03, 2017