NateShoffner / lanco-discord-bot

Discord bot tailored to Lancaster County/City in PA.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

🌹 LancoBot

Discord bot tailored for Lancaster Count, PA.

πŸŽ‰ Features

  • Incident Reporting - Report emergency services incidents throughout Lancaster County.
  • Custom Commands - Create custom commands for your server.
  • TwitterEmbed - Fix Twitter/X embeds in Discord.
  • InstaEmbed - Fix Instagram embeds in Discord.
  • TikTokEmbed - Fix TikTok embeds in Discord.
  • GeoGuesser - Lancaster County/City tailored GeoGuessr.
  • BarHopper - Find bars within Lancaster City.
  • BusFinder - Find RRTA bus schedules and plan trips.
  • Weather - Get the current weather and forecast for any location.
  • AnimeToday - Display an anime screenshot featuring the current date every morning in a specified channel.
  • SpotifyEmbed - Alternative Spotify embeds in Discord.
  • RedditEmbed - Fix Reddit embeds in Discord.
  • OneWordStory - Create a one word story with your friends.
  • TraceMoe - Reverse image search for anime screenshots.
  • Facts - Define and display facts.
  • RedditFeed - Subscribe to subreddits and receive updates in your server.
  • OpenAIPrompts - Generate creative writing prompts.
  • Magic8Ball - Ask the Magic 8 Ball a question.
  • Birthday - Set and display user birthdays.
  • Google - Let me Google that for you.

πŸš€ Installation

First you will need to clone the repository:

git clone https://github.com/NateShoffner/lanco-discord-bot

Next, go to the Discord Developer Portal and create a new application. Create a bot for the application and copy the token. You will need to add the bot to your server using the OAuth2 URL generated in the portal.

Copy the .env.default file and create a .env file with your bot token and other settings including the SQLite database path.

The other API keys are optional depending on what cogs you want to enable.

You'll need to install the dependencies using Poetry:

cd lanco-discord-bot
poetry install

After installing the dependencies, you can run the bot using the following command:

poetry run python app/main.py

🐳 Docker

Alternatively, you can use Docker to run the bot via docker-compose.

Cogs are generally disabled by default. Please refer to the cogs directory for more information on how to use them.

πŸ› οΈ Contribute

Feel free to fork and submit pull requests for any features or fixes you think should be included.

πŸ‘‰ Support

If you need help with the bot join the Lancaster County Discord or open an issue.

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ“‚ Project Structure

.
β”œβ”€β”€ app                     # Main application directory
β”‚   β”œβ”€β”€ cogs                # Discord cogs
β”‚   └── utils               # Utility functions
β”œβ”€β”€ data                    # Data files
β”œβ”€β”€ logs                    # Log files
└── migrations              # Database migrations

βš™οΈ Cog Development

All features are implemented as cogs in the cogs directory.

To create a new cog, create a new folder in the cogs directory with the name of your cog and an entrypoint script within it with the same name as the folder.

mkdir app/cogs/yourcog
touch app/cogs/yourcog/yourcog.py

All cogs should inherit from the LancoCog class.

import discord
from discord.ext import commands
from cogs.lancocog import LancoCog

class YourCog(LancoCog, name="YourCog", description="Your cog description."):

    def __init__(self, bot: commands.Bot):
        super().__init__(bot)

async def setup(bot):
    await bot.add_cog(YourCog(bot))

About

Discord bot tailored to Lancaster County/City in PA.

License:MIT License


Languages

Language:Python 98.7%Language:Dockerfile 1.3%