Discord Bot mit allerlei Funktionen, die im Chat gebraucht werden.
*** Step 1: getting your own bot running:
You can create your own app, convert it to a bot and see your YOUR_App-ID here: https://discordapp.com/developers/applications/me There are 2 Keys / Secrets for discord API. All of them are located in /content/Secure.java
- add your "app bot user Token" to
public static final String DiscordToken = "";
Permissions required to run: DOK Permissions: https://discordapp.com/developers/docs/topics/permissions#bitwise-permission-flags
- READ_MESSAGES 0x00000400 Allows reading messages in a channel. The channel will not appear for users without this permission
- SEND_MESSAGES 0x00000800 Allows for sending messages in a channel.
- MANAGE_MESSAGES 0x00002000 Allows for deletion of other users messages
- MANAGE_ROLES 0x10000000 Allows management and editing of roles (add role "verified")
- Result: 0x10002C00
AUTH Link: (manage roles permission) https://discordapp.com/api/oauth2/authorize?client_id=_____YOUR_App-ID_____&scope=bot&permissions=0x10002C00
*** Step 2: Twitter integration: There are 4 Keys / Secrets for the Twitter API. All of them are located in /content/Secure.java
public static final String ConsumerKey = "";
public static final String ConsumerSecret = "";
public static final String AccessToken = "";
public static final String AccesSecret = "";
To find all the required information get yourself into https://dev.twitter.com/overview/api and make yourself familiar with the basics. However, if you don't want to do this here is a step-by-step.
- You will need a twitter account with a verified phone number. Go get it.
- You need to join the dev.twitter.com team
- Create your Twitter app here: https://apps.twitter.com (read only permission).
- After you created your app you will find the
Consumer Key (API Key)
and theCustomer Secret (API Secret)
on theKeys and Access Tokens
page. - Generate your access token (bottom of the page). You now got the
Access Token
and theAccess Token Secret
. - Add them to /content/Secure.java
*** Step 3: Access to your IP Database The bot does not have direct access to your database. It's using the API of your Website.
- to generate a token for your bot login to any admin account, go to your user settings and click at
Neuer Token
. - add your "database token" to
public static final String DBToken = "";
in /content/Secure.java
*** Step 4: Access to YouTube API This Bot uses the YouTube Data API V3. Follow these Steps to access it:
- Go to https://console.developers.google.com/apis/dashboard
- Select your Project or create a new one
- Click 'Activate API' -> 'YouTube Data API' -> Activate
- Go to https://console.developers.google.com/apis/credentials
- Click 'generate Authentication Data' -> 'API Key'
- Copy your Key and paste it to content/Secure.java
public static final String YouTubeKey = "";
Congratulations, your bot is ready to run.