Skip to content

Millefeuille42/piscibotReloaded

Repository files navigation

Segbot

Website GitHub last commit DeepSource

The perfect tool to track your progress and compare with your friends or to organize contests for the piscines!

Features

  • Admin:

    • Auto-Role management
    • Customisable channels
    • Admin list system
  • User:

    • Customizable dms and mentions notification settings
    • Track students or pisciners
    • On demand profiles, leaderboards, etc...
    • Real-Time alerts about your target
    • Multi-server support

How to use

Getting started

First join a server containing the bot, or add the bot to your own server

Commands

Admin

  • init -> Register the server
  • admin @user (mention) -> Give user(s) admin privileges, you can set multiple users at once
  • channel <command | leaderboard | success | started | location> -> Set provided message stream(s) to current channel, you can set multiple streams at once
  • params -> Get the server's settings
  • purge -> Delete every message on all the bot's channels
  • lock -> Lock the registrations, nobody can register anymore
  • unlock -> Unlock the registrations

User

  • start -> Create your profile, you'll need to verify your account to complete the registration. The profile is independent of the servers
  • track <login> -> Track provided student, one user per server
  • untrack -> Untrack current server's student (Automatically set to spectate)
  • spectate -> Get the spectator role, This role is intended to permit you to see dedicated channels without being tracking someone
  • ping <success | started | location>:<none | dm | mention | all> -> Edit the notification system for provided message stream(s), you can set multiple streams at once
    • Example -> ping started:dm to get dm'd everytime your target starts a project
  • settings -> Get your notification settings
  • help -> Send the readme
Commands
  • list-<tracked | students | location | projects> -> Send a list according to the provided parameter. (don't forget the dash!)
    • tracked -> Send a list of all the targets.
    • students -> Send a list of all the targets, indicating of the target is a student, or not.
    • location -> Send a list of all the targets, indicating their current location.
    • projects -> Send a list of all the currently available projects for the command project (see below).
  • profile <login> -> Send the profile of the provided target(s). If none provided, sends the profile of your current target.
  • leaderboard <cursus> -> Send a leaderboard for the provided cursus.
  • project <project> -> Send the completion status for the given project(s) for all the targets on the server.
  • user-project <login> -> Send the completion status of the projects for the provided target(s). If none provided, sends the profile of your current target.

Host your own

You can host your own version of the bot, you'll need to set up a discord bot, and a 42 bot.

You'll also need to define the following environment variables :

  • BOT_TOKEN -> The discord bot token
  • BOT_DEV_CHANNEL -> The discord bot default error channel
  • API_PORT -> The internal 42api port
  • SEGBOT_PORT -> The internal discord messaging port, should not be conflicting with the previous one
  • APP_HOST -> The hostname / IP of the server hosting the app
  • APPUID -> The 42 app UID
  • SECRET -> The 42 app secret
  • SEGBOT_PREFIX -> Choose a custom prefix (Defaults to ! if none provided)

Then, run the app with docker-compose up --env-file <.env file> -d and shut it down with docker-compose down

Code overview

GitHub repo size GitHub code size in bytes GitHub

Segbot 42API Checker
The Discord Bot section, handle commands and manages users. Fetches and store students data from the 42 Api. Cycles on tracked students, check differences and report updates to discord.
 GitHub go.mod Go version (subdirectory of monorepo) GitHub Workflow Status GitHub Workflow Status  GitHub go.mod Go version (subdirectory of monorepo) GitHub Workflow Status GitHub Workflow Status  GitHub go.mod Go version (subdirectory of monorepo) GitHub Workflow Status GitHub Workflow Status
Millefeuille BoyerDamien and Millefeuille BoyerDamien and Millefeuille

About

The infamous piscibot!

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •