Git Product home page Git Product logo

q2a-discord-integration's Introduction

Discord integration plugin to Question2Answer

Plugin offers logging with Discord account to existing Q2A account. It's useful when you want connect Discord server users to Q2A users - you will know who is who on Discord.

Tested on Q2A version >= 1.7.0 and PHP >= 7.0. Code style adjusted to Q2A style.

Description

After login user in Discord server receive nick from Q2A. The user can join to server only one Discord account per Q2A user. The user can remove connection and connect other Discord account. Of course, when user disconnecting account, it's also remove from the server. When the user change nick, plugin automatically change this on Discord. When user account is blocking or deleting, plugin automatically remove linked account from Discord server. Blocked user can't join to Discord.

Installation

Clone or download this repository or selected release to qa-plugin directory in your Q2A.

Configuration

Prepare your Discord application. You might create it in Discord Developer Portal.

Go to admin panel and Plugins tab (/admin/plugins). Q2A should automatically prompt for execute database changes, for example by red alert on page top: The Discord integration admin page module requires some database initialization. Click it. Next, search Discord integration and click settings link next to the plugin description.

Option Description Required? / Default value
Discord API client ID Discord application client id Yes
Discord API secret key Secret client key for your Discord application Yes
Discord server ID ID of server to which users will be joined Yes
Information in page top (HTML allowed) Custom message shown in page top, over join button No / No information
Information in page bottom (HTML allowed) Custom message shown in page bottom, under join button No / No information

After setting, click Save button. Integration page is available on /discord-integration. You might create custom menu position linked to page etc. When required fields aren't filled, plugin doesn't work (integration page doesn't shown).

On Discord server you should disable creating invitations and changing nicks for normal users. Don't forget invite application bot to your server. Bot must have permissions: Kick members, Create Instant Invite, Manage nicknames to right working.

q2a-discord-integration's People

Contributors

awaluk avatar

Stargazers

 avatar

Watchers

 avatar  avatar

q2a-discord-integration's Issues

Getting invalid oath2 redirect

Hi Iโ€™m a bit of a noob when it comes to this I created the application and I put in the details and I click the discord button and it says invalid oauth2 redirect

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.