Skip to content

JH-Discord/JHDBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

14441b4 · Apr 17, 2024
Apr 17, 2024
Mar 31, 2024
Nov 12, 2023
Aug 7, 2020
Jul 23, 2020
Jan 4, 2022
Jul 25, 2020
Apr 14, 2020
Aug 5, 2020
May 19, 2021
Aug 12, 2020

Repository files navigation

JHDBot

PRs Welcome

The bot of John Hammond discord using discord.py

Project Structure

The JHDBot uses an external website to generate a discord invite link after the user passes a reCaptcha.

The structure is as follows:

  • JHDBot/* Code for the Discord bot
  • verify-web/* Code for the website running the reCaptcha

Running the bot

The bot can be run through docker-compose.

$ docker-compose up -d

Use the supplied .env-example to create a .env file with the necessary environment variables.

Environment variables

The .env-example should be either copied or moved to .env.
The environment variables that need to be supplied are as follows:

  • DISCORD_API_TOKEN: The api token of the discord bot to authenticate with Discord's api.
  • DISCORD_SERVER_CHANNEL_ID: The channel id of the channel that you want the invite link to be for. An example of how to get this is here: Where can I find my User/Server/Message ID?
  • BOT_PREFIX_CHARACTER: The prefix character to be used for the bot. Common ones are: !, $, ., and -.
  • RECAPTCHA_PUBLIC_KEY: The api key generated by reCaptcha that is put inside the HTML on the client side.
  • RECAPTCHA_PRIVATE_KEY: The api key generated by reCaptcha that is used on the server side.