A discord bot specifically for managing my student servers @ FHTW
hackxit / bic-fhtw-discord-bot Goto Github PK
View Code? Open in Web Editor NEWA discord bot specifically for managing my student servers @FHTW
A discord bot specifically for managing my student servers @FHTW
Pinning is done by reacting to a message with ๐
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.
The automation workflows should be properly setup with GitHub Actions.
Whenever a new package is created, scripts should update the bot to the latest package version.
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
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.
/report
commandStudents who leave the server will want to delete their stored registration information.
This action should be...
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.
The process should be simple:
The application currently only works in local development, since I don't have public URLs setup.
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.