GithubHelp home page GithubHelp logo

discord-flvrbot's Introduction

FlvrBot

FlvrBot is a Discord bot designed to provide various useful features to your server.

Features

TODO: Add more information about features.

Installation

To use FlvrBot in your Discord server, follow these steps:

  1. Clone this repository to your local machine.
  2. Install the required dependencies using pip install ..
  3. Set up a .env file with your Discord bot token and any other necessary environment variables.
  4. See the example on how to run the bot with example/main.py.
  5. With example/main.py if you create a cogs folder you can load your own custom cogs without needing to modify any core files. See the docker-compose.yml file for an example of how it works.

See Dockerfile if you wish to see how it is ran in Docker or docker-compose.yml to run with docker-compose.

Available Commands

  • /8ball: Returns an 8-ball response. Example: /eightball
  • /chucknorris: Sends a random Chuck Norris Fact from https://chucknorrisfacts.net/
  • /convert: Converts units. Usage: /convert <value> <from_unit> <to_unit>. Utilizes the Pint library.
  • /currency: Converts currency. Usage: /currency <value> <from_currency> <to_currency>. Utilizes the exchange rate api.
  • /lenny: Sends a random lenny face
  • /mock: Creates mock text. Example /mock my bot is better than yours -> My BoT iS bEtTeR tHaN yOuRs
  • /ping: Shows bots latency
  • /rekt: Rekts another user. Example: /rekt <@username>.
  • /roulette: Plays a game of Russian Roulette. Example: /roulette.
  • /seen: Check when was the last time a user was seen. Example: /seen @flvrtown.
  • /slap: Slap someone in the channel. If no one is mentioned, a random person is slapped. Example: /slap @flvrtown.
  • /time: Displays the current time in a specified timezone. Example: /time <timezone>.
  • /timeuntil: Converts a given timestamp to a Unix timestamp and tells how long until that time. Example: /timeuntil April 20, 2025 4:20pm or /timeuntil 04/20/25 4:20PM.
  • /top10: Shows the top 10 users by various metrics. Usage: /top10 [module] [sort_by]. By default [module] is set to userand[sort_by]is set tocharacters` if no input provided.
  • /uptime: Shows how long the bot has been running.
  • /weather: Gets weather information for a given location. Uses OpenWeatherMap and Google Maps. Example: /w Austin, TX or /weather 78702.

Environment variables

Currently, this bot uses a few variables:

  • DISCORD_TOKEN: This is the token you receive from Discord. Default: None.
  • DB_URL: This is a SQLAlchemy database URL string. Default: sqlite:////tmp/flvrbot.db. Supports postgres out of the box. You can look at docker-compose.yml to see an example of using postgres.
  • OPENWEATHER_APIKEY: API key for accessing weather information from OpenWeatherMap. See OpenWeatherMap.
  • GOOGLE_MAPS_APIKEY: API key for accessing location data from Google Maps. See Google Maps.

Additionally, the following environment variables are used:

  • WEATHER_API_VERSION: Specifies the version of the OpenWeatherMap API to use. Defaults to 2.5. Note that version 3.0 requires a credit card on file with OpenWeatherMap. For more information, see One Call API 3.0.

Notes

  • Database Usage: Users are stored in a database table named users. This table is utilized by various functionalities, such as the /seen command. For example, invoking /seen @username will provide information on when the specified user was last seen and the message they sent.

  • Multi-Tenant, Multi-Guild Compatibility: FlvrBot is designed as a multi-tenant, multi-guild compatible bot. This means that users in different guilds cannot access the statistics or user lists of other guilds. By default each guild's data is accessible only to admin members within that specific server, and the bot owner.

  • Inspired by BLBot

    • FlvrBot is kind of like the cousin of BLBot, a project I've been involved with as a maintainer. I've had my hands in a lot of the cogs there, so FlvrBot naturally shares some similarities and can even use some of the same stuff with slight modification.

discord-flvrbot's People

Contributors

zfouts avatar

Stargazers

Elijah Wright avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.