Giter Club home page Giter Club logo

bic-fhtw-discord-bot's Introduction

fhtw-discord-bot

A discord bot specifically for managing my student servers @ FHTW

bic-fhtw-discord-bot's People

Contributors

hackxit avatar

Watchers

 avatar

bic-fhtw-discord-bot's Issues

As an administrator, I want to restrict the pinning of messages

It should be configurable, which channels allow pinning messages.
It should also be configurable, which user-groups are allowed to pin messages, for a given channel.

  • Bot configuration via discord commands (restricted to administrator)
  • Assignment of channels and roles for pinning

Fix workflow to publish docker image for usage with portainer

The current workflow for publishing the docker image works fine, but it needs to be modified.

Portainer currently is unable to pull the image.
image not found ...

From docker cli I also cannot pull the image.

$ docker pull ghcr.io/hackxit/fhtw-discord-bot:sha256-3ec46d8d6e203d5d67183ca3ca0deb989e4c90ce8ed38b7b010b90c7e2545360.sig
sha256-3ec46d8d6e203d5d67183ca3ca0deb989e4c90ce8ed38b7b010b90c7e2545360.sig: Pulling from hackxit/fhtw-discord-bot
unsupported media type application/vnd.dev.cosign.simplesigning.v1+json

The workflow template I used is a bit overkill for what I need.

I should instead follow this guide:
https://docs.github.com/en/actions/publishing-packages/publishing-docker-images

As a student, I want to report issues with the bot

It's really annoying having to create issues by hand, if the user has problems.

A simple /report functionality to create a GitHub issue for me would be great, where one can describe faulty behavior and I can address the issue.

  • Implement /report command
  • Create GitHub issue for report
  • Assign defaults for issue to show up in backlog

As a student, I want to delete my information if I decide to leave the server

Students who leave the server will want to delete their stored registration information.

This action should be...

  • manual (i.e. app command for the user)
    => This also serves the purpose of re-registering a user
  • automatic (i.e. user leaves the server)

The app shall delete the student information from the database in its entirety.
(I'm not really storing much, aside from what is gathered during registration)
For administration purpose and also for the purpose of not ruining history, messages on the discord server will be kept.

Another bot can handle deletion of message by request from the user.

As a student, I want to join the server and have an understandable on-boarding

The process should be simple:

  1. Join the server
  2. Read & accept the rules (mandatory, done via discord community guidelines)
  3. Be greeted by bot. Inform bot about mail address and current semester position.
  4. Accept invitation in the e-mail and have all access granted for my given semester position.
  • Implement greeting by bot
    => Should include registration how-to
  • Implement direct messaging for rules with acceptance by the user
  • Implement user-help for the bot
    => Should provide how-to for usage of the bot and also explain what the bot does / stores

As an owner, I want to self host my application and allow users to reach the public API

The application currently only works in local development, since I don't have public URLs setup.

  • DNS setup for redirecting links to WebApp host for public API
  • Cloudflare tunnel to hide private hosting while exposing public API
  • Portainer stack for setup with latest repository package
  • Test of application via public API
  • Beta-Test with some willing user

User registration is flaky - fails if fields are missing

The current user registration fails on incomplete data and it probably isn't a nice user experience when clicking the link.

public static Student? ConvertFromUserprofileScrapeResult(UserprofileScrapeResult scrapeResult)
    {
        return scrapeResult is 
            {Username:not null, 
                Email: not null, 
                Studiengang: not null, 
                Semester: not -1, 
                Verband: not null,
                Gruppe: not -1} 
            ? new Student(
                scrapeResult.Username, 
                ("m" + scrapeResult.Username[..2]).ToUpper(), // FIXME some hacky way of creating the shortname
                scrapeResult.Studiengang,
                2000 + int.Parse(scrapeResult.Username[2..4]), // FIXME again a little hacky but it's 01:00 again and this works for now
                scrapeResult.Semester,
                (char)scrapeResult.Verband,
                scrapeResult.Gruppe) 
            : null;
    }

The above function expects all scrape results to be filled, however we can already determine that the registration was successful solely by the link.

It would be better to separate registration from assigning user roles.

I suggest that /register only verifies the user via e-mail and the callback shall add the user to the database.

Another command /update shall be introduced which will re-attempt the scraping.
This could then be done entirely within the discord bot implementation and can directly inform the user what fields are faulty or missing.
Providing that information from the API callback is harder and much more annoying for the user.

For that reason, a new role would be necessary to differentiate the user state for having assigned roles according to their CIS information, versus to only have partial data (i.e. mail address)

It would also need adjustment of the student constructor in the database.

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.