A multi-purpose discord bot, with an expansive selection of commands.
Note
The instance of this bot, that I host, is not available in any servers beyond the support server and a friend's. This is because it has very limited functionality at the moment.
Command | Description |
---|---|
/help | Displays the help menu - contains a list of commands. |
/runtime | Shows how long the bot has been online. |
/watchlist {show/remove/add} {streamer_name} | Allows for the managing of the Twitch streamer list for to LIVE alerts - the streamer name is only needed when adding or removing and must be as is shown in their link e.g. https://twitch.tv/{streamer_name} . |
/setlivechannel {channel} | Allows for the changing of the channel the bot sends notifications in. The channel must be input using discord's in-built channel handling e.g. #{channel} |
/setlivemessage {message} {@Role} | Allows for the creation of custom messages for stream notifications. The role must be added using the discord in-built role handling e.g. @{role} |
/shutdown {reason} | Shuts the bot down displaying a message to the bot log. |
Requirement | Version |
---|---|
discord.py | >v2.5.0 |
requests | >v2.31.0 |
typing | >v3.7.4.3 |
Having a twitch developer account with 2FA enabled.
Having a discord developer account with 2FA enabled.
- Go to the Discord Developer Portal and
login
. - Click on
New Application
in the upper-right hand side of your screen, under your profile picture. - Name your application, accept the Discord Developer Terms of Service and Developer Policy and click
Create
. - Now navigate to
OAuth2
in the sidebar and scroll toOAuth2 URL Generator
. - Select
bot
as your scope and then set your bot's permissions, copy the Generated Url and save it in a safe place. - Next navigate to
Bot
on the sidebar and scroll toPrivileged Gateway Intents
and checkPresence Intent
,Server Member Intent
andMessage Content Intent
- Save all your changes as they come.
Caution
Never share your discord bot token, it can be used to control your bot!!!
-
Ensure you have Python
v3.11
or greater installed and ensure that the following are installed:- discord.py
- requests
- asyncio
- typing
-
In the root directory create a
.env
file. inside the.env
file you will have a constant calledELYSIUM_TOKEN
. Grab your Bot Token from the Discord Developer Portal and put it into your.env
file like so:ELYSIAN_TOKEN="KUFHSDIUHKUh-UHLIUkudshliughj89w3eyr"
-
Edit the
main.py
file's constants, you'll need to change thepublic_log
andprivate_log
to the discord channel ids in which you want bot info such as, turning on and off to be displayed.Set the
dev_id
to the discord user id of yourself or the person managing the bot.Finally, change
twcord_userid
to the discord user id of the person that will have control over the bot's twitch notification commands.When your done it should look like so:
# Constants # public_log = 1234227629557547029 # Change to you public bot log channel ID private_log = 1234227628924207283 # Change to you private bot log channel ID dev_id = 876876129368150018 # If you are hosting this bot, change this to your Discord UserID twcord_userid = ( 972663150455451689 # The ID of the person handling the bot's Twitch notifications. )
Note
Check out this guide by Partymann2000.
- Go to the Twitch Developer Portal and
login
. - Click on
Your Console
, should be located in the top-right in the navbar. - Navigate to
Applications
and clickRegister your application
. - Name your application (Cannot contain the work Twitch).
- Set the
OAuth Redirect URL
field tohttps://localhost/
. - Set the
Catagory
to Other and complete the Captcha and clickCreate
. - Now click on
Manage
on your application. - Grab you
clientID
andclientSecret
and put them in yourconfig.json
file.
Caution
Never share your ClientID or ClientSecret!!!
config.json
{
"twitch": {
"client_id": "clientID",
"client_secret": "clientSecret",
"access_token": "xxx",
"channel_id": 6523487523834,
"expire_date": 1669483138,
"watchlist": [
"streamer1",
"streamer2",
"streamer3"
]
}
}
- Don't forget to rename
config_template.json
toconfig.json
once its been populated. - Set the
channel_id
to the discord channel you want the bot to send the message in - Populate your
watchlist
with the streamers you want to recieve notifications for.
To get support for the Elysium discord bot, feel free to :
- Open an issue on Github
- Join the discord server
- Or to visit my website
This repository is listed under the MIT License