3. Configuration - Lasauce6/jean_robo GitHub Wiki
Configuration
Configuration is done by editing the config.json file in the conf folder. I would suggest using an editor like Notepad++ to edit the file. (We are working on a better way to configure it)
-In the first section you will have to enter your prefix for the bot and your discord bot token. Choose any prefix you want and copy and paste your token obtained earlier from the Step #3 of Preparation
"prefix": "YOUR PREFIX",
"token": "YOUR TOKEN HERE",
Will look like something like this:
"prefix": "*",
"token": "7PGNyakySQu8ZH0T3Y7EDldSnHKlOGbL.SFTM7Zq38J-aDR2pflmUS",
- Then in "connection" you will have to enter your YouTube v3 API Key that you have obtained earlier in Step #2 of Preparation. Just copy and paste it into the field, so that this:
"Google API key": "YOUR GOOGLE API KEY",
Will look like something like this:
"Google API key": "4P9nlidzQdMCxCzDymrUDpNwapMQ5jqC",
- You need to provide your Twitch app ID from Step #8 in Preparation.
"Twitch app id": "YOUR TWITCH APP ID",
Becomes something like this:
"Twitch app id": "ag597fj6bsdfqeg5yfds7d8sh2bng6d",
- Then provide your Twitch app secret ID from Step #9 in Preparation
"Twitch secret app id": "YOUR TWITCH SECRET APP ID"
Becomes something like this:
"Twitch secret app id": "hqdtazs4gs46gj753gsn40fdghbq4d"
- You can specify the time period in minutes the bot will check the YouTube channels for new content. I do not recommend going lower than 5 minutes though, because your daily use of queries is limited and can be used up very quickly that way. Just change the "10" to whatever you desire.
Ping Every x Minutes: 10
- Then you can configure all of your Youtubers and Streamers with differents messages for all of thems :
"YouTubers": {
"0": {
"name": "NAME OF THE FIRST YOUTUBER",
"channelID": "YOUTUBER CHANNEL ID",
"Discord Channel": {
"0": {
"channelID": CHANNEL ID,
"New video": "DISCORD MESSAGE TO PUSH WHEN THERE IS A NEW VIDEO",
"Livestream": "DISCORD MESSAGE TO PUSH WHEN HE IS LIVESTREAMING"
},
"1": {
"channelID": ANOTHER CHANNEL ID,
"New video": "DISCORD MESSAGE TO PUSH WHEN THERE IS A NEW VIDEO",
"Livestream": "DISCORD MESSAGE TO PUSH WHEN HE IS LIVESTREAMING"
}
}
}
},
"Streamers": {
"0": {
"name": "STREAMER NAME",
"channelID": STREAMER CHANNEL ID,
"Discord Channel": {
"0": {
"channelID": CHANNEL ID,
"Twitch": "DISCORD MESSAGE TO PUSH WHEN HE IS LIVESTREAMING"
},
"1": {
"channelID": ANOTHER CHANNEL ID,
"Twitch": "DISCORD MESSAGE TO PUSH WHEN HE IS LIVESTREAMING"
}
}
}
}
Will look like something like this :
"YouTubers": {
"0": {
"name": "LinusTechTips",
"channelID": "UCXuqSBlHAE6Xw-yeJA0Tunw",
"Discord Channel": {
"0": {
"channelID": 813759236471963706,
"New video": ":film_frames: **{0} HAS UPLOADED A NEW VIDEO!** :film_frames:",
"Livestream": ":red_circle: **{0} IS LIVESTREAMING NOW!** :red_circle:"
},
"1": {
"channelID": 813288860955601971,
"New video": ":film_frames: **{0} HAS UPLOADED A NEW VIDEO!** :film_frames:",
"Livestream": ":red_circle: **{0} IS LIVESTREAMING NOW!** :red_circle:"
}
}
}
},
"Streamers": {
"0": {
"name": "LinusTechTips",
"channelID": 419658942,
"Discord Channel": {
"0": {
"channelID": 813779235471963706,
"Twitch": ":red_circle: **{0} IS LIVESTREAMING NOW!** :red_circle:"
},
"1": {
"channelID": 813788530955601974,
"Twitch": ":red_circle: **{0} IS LIVESTREAMING NOW!** :red_circle:"
}
}
}
}
- Make sure that all of yours message are quoted ("") (except for "ChannelID" and "Ping Every x Minute"). The following parameters can be used:
- {0}
- Name you specified in the YouTubers configuration
- @everyone
- Mention @everyone on Discord
- <@DiscordUserID>
- Mention a specific user on discord, ID can be obtained like described in Step #6 in Preparation.
- <@&DiscordRoleID>
- Mention a specific role on discord, ID can be obtained like described in Step #6 in Preparation.
- :EmojiName:
- In my example configuration file, I am using emoji's like :clapper: and :red_circle:. You can use all the emoji's with :EmojiName:. Emoji names can be obtained by clicking on the emoji symbol on the right in the Discord textchat, and a mouseover will reveal the plain text that you need to enter.
- {0}