Django Discord Connector
- Navigate to Settings
- Click Manage Settings under
- Follow the steps below to obtain the values for each setting
Create a Discord Application
- Navigate to https://discordapp.com/developers/applications
- Click “New Application”
- Fill out a name, click create.
- Add an application icon, description, and customize your application.
- Copy the
CLIENT IDvalue, save this for later.
- Copy the
CLIENT SECRETvalue, save this for later.
Create a Bot
- Click the Bot section
- Add a Bot.
- Customize your bot, add an icon and username.
- Copy the
TOKENvalue, save this for later.
Copy Server ID
- Open your Discord settings
- Navigate to Appearance
- Enable Developer Mode
- Right click your Server icon in the Discord menu
- Copy ID. Save this for later.
Create an Invite Link
- Navigate to your server, hover over a channel and create an invite link.
- Select no expiry, unlimited uses. Save this link for later.
Typically, you'll just be mapping Discord Groups to standard Groups.
Pulling Discord Groups
Currently this is a bit clunky, a better interface is coming soon.
- Navigate to Admin Panel
- Click Periodic Tasks
- Create a task, name it "Pull Discord Groups"
- Select the Task
- Disable the task by default
- Select an interval schedule
Now, you'll be able to select that task and (from the Action dropdown) Run selected task.
Mapping Discord Groups
Once you've pulled your discord groups, you can attach them to standard Groups by going to Discord Groups, selecting the Discord Group you want to map, and selecting the standard Group.
By default, Discord groups are applied every 5 minutes. You can edit this under Periodic Tasks, or manually run it.
>=1.2.2rc2, nickname enforcement is available.
Clean up Dangling Objects
In previous versions of the package, dangling objects were allowed. Since 1.2.0, this is no longer the case.
sudo docker-compose exec app python3 /opt/krypted/app/manage.py shell from django_discord_connector.models import DiscordToken, DiscordUser DiscordToken.objects.filter(discord_user=None).delete() DiscordUser.objects.filter(discord_token=None).delete()
If you plan to use naming enforcement that involves other packages (e.g Django EVE Online Connector), ensure these are installed.
- Enable the nickname enforcement task in your settings
- Go to Discord Settings in the Admin Panel (or Settings panel) and add a
name enforcement schema
||The Krypted Platform username||
||Primary character full name||
||Primary character corporation ticker||
||Primary character alliance ticker||
[%corporation] %character would result in something like