Skip to content

Texas A&M Cybersecurity Club attendance bot

License

Notifications You must be signed in to change notification settings

deciphr/CyberHam

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CyberHam

Setting up the bot

Creating the bot

Go to the discord developer portal and create a new application. Using the button on the top right.

Create a bot profile

Go to the bot tab and reset the token. This is what you will put in the discord_token parameter in the config.toml file.

Reset the bot token

On the same page, turn off public bot and set the Priviledge Gateway Intents as shown below.

Declare bot intents

Inviting the bot

Copy your application id on the General Information tab, and put this into this url

Aquire the client ID of your bot

Then insert the application id into this url, replacing "{APPLICATIONID}" with your number. https://discord.com/api/oauth2/authorize?client_id={APPLICATIONID}&permissions=3072&scope=bot%20applications.commands This is the discord bot invite link,(giving it only read/write message perms). You use to add the bot to your testing server.

Getting the guild id

The guild/server id can be located in the widget tab in the server settings.

Acquire a test guild ID

This is the guild id you include into the test_guild_ids parameter in the config.toml

Running the bot

Prerequisite

git clone https://github.com/tamucybersec/CyberHam.git # the SSH link can used if that works
cd CyberHam

Installation

python3.11 -m venv venv 
source venv/bin/activate
pip install -r requirements.txt

Configuration

Create a config.toml file in the root of the repo and set the following values:

[google]
client_file_name = "client_secret_2_{FILL IN -> client_id}.apps.googleusercontent.com.json" # the file name of the client_secret.json file you downloaded from google cloud API and is placed in cyberham/secrets/
[discord]
token = "" # the discord token for the bot as a str
test_guild_ids = [] # [631254092332662805] is the cyber club server, the id of discord guilds in a comma seperated int array
admin_channel_id = 1014740464601153536 # channel to send bot information to, currently is the channel used in the cyber club discord

Execution

python -m cyberham

Contributing

  • Coordinate with team to decide on tasks to do
  • make a new branch named your feature
  • make a PR once you are done
  • someone else will review and merge your PR

About

Texas A&M Cybersecurity Club attendance bot

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%