Download the PHP package routmoute/routmoute-discord-bundle without Composer
On this page you can find all versions of the php package routmoute/routmoute-discord-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package routmoute-discord-bundle
RoutmouteDiscordBundle
Manual Installation
Make sure Composer is installed globally, as explained in the installation chapter of the Composer documentation.
Step 1: Create configuration file
Create configuration file config/packages/routmoute_discord.yaml
and modify scopes if you want
Step 2: Download the Bundle
Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:
Configuration
Step 1: Create your Discord Application
- Go to https://discord.com/developers/applications
- Create a New Application
- Copy
CLIENT ID
andCLIENT SECRET
for next step - Go to
OAuth2
Tab - Add Redirect
https://yourDomain.domain/receiveDiscord
- Go to Bot Tab and copy
TOKEN
for next step
Step 2: Create your env variables
Add this environments vars in your .env
file.
Usage (for Symfony 5)
Discord OAuth
Step 1: Create Controller in your App
Create Controller, for exemple src/Controller/DiscordOAuthController.php
Step 2: Create your redirect button
Create a button in your frontend that redirect to routmoute_discord_redirect
path.
for example, in twig template:
Discord API (Bot)
Example usage in Controller:
https://discord.com/developers/docs/resources/user
Parameters
client_id
Required
The CLIENT ID
provided by discord
client_secret
Required
The CLIENT SECRET
provided by discord
scope
Required The Discord API scopes - https://discord.com/developers/docs/topics/oauth2#shared-resources
identify
- discordId, avatar, username, discriminatoremail
- email- ...
bot_token
Required
The Bot TOKEN
provided by discord