GithubHelp home page GithubHelp logo

stijndcl / didier Goto Github PK

View Code? Open in Web Editor NEW
10.0 10.0 6.0 5.42 MB

Over-engineered Discord bot for my Ghent University class

Python 99.86% Mako 0.14%
bot didier discord discord-bot discord-py python python3

didier's People

Contributors

maartens11 avatar stijndcl avatar themessik avatar thepieterdc avatar tomalard avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

didier's Issues

[FEATURE] Update Ufora Notification ID's

When next year starts, add BA3 course URLs & names to the relevant files.

Also, ask people from BA1 & BA2 what the new URLs are so that they can use the notifications as well.

[FEATURE] Dump db generation code

This makes it easier for people to work on Didier, allowing them to copy-paste this code into their PSQL console instead of manually creating every table.

Whitelisting channels/servers

Currently adding Didier to another server and whitelisting channels requires the actual code to be changed & a restart. That's bad.

  • Read allowedChannels from a database instead of a hardcoded list
  • Database: [id | type] (type = channel/guild/...)
  • Make a database entry for whitelist/blacklist
  • Make a command to whitelist/blacklist the current channel (or one that gets tagged & passed as an argument), add it to database
  • Make a command to whitelist the entire server, add it to database
  • Make getDisplayName check if the member is in the current server or not before checking COC

didier faq, but channel based

when didier faq is called:
look for the channel it was typed in, and show the faq page corresponding to that channel

Increase Python version

Discord 2.0 & recent Quart versions require higher Python versions (3.8+). Didier's Python version should move with it to support all the new features once they are released.

Once this is done, update Quart and Quart-CORS to proper non-ancient versions, and change the version in the readme.md & .python_version files.

[BUG] dink claiming

Describe the bug
If you give any argument to didier claim f.e. 500t it should claim only 500t but it says "Geef geldig bedrag op."

Steps to reproduce
Type didier claim 250t

Screenshots
image

Rework Les to use classes

Using big dicts everywhere is a huge mess

Already WIP (branch les_rework)

EDIT: Add support for ELOSP livestream links, and make it easier to add platforms like Gather

[FEATURE] Use dataclasses for SQL querries

Big tuples are a bit of a mess, and having to look up the indexes for every element every time is annoying & ugly. This should be simplified by putting everything into a class that stores the data as properties.

[FEATURE] Fix requirements.txt

A fair amount of requirements are missing from the file apparently.

Also, add some info on how to install menus & postgresql

[FEATURE] Replace Dyno memes

Dyno has a limit on custom commands, :boos:

image

Create Didier commands, triggerable with ? as a prefix for consistency, sends images.

The current "memes" and "addmeme" will have to undergo a namechange (or make a "Custom Commands" section instead so it can be used for other random stuff).

[FEATURE] Make Define paginated

Some top definitions are a bit obscure (or just terrible), it's a good idea to add pagination to find proper definitions.

Check react length

Maximum number of reactions is 20, check if previous + new > 20 so an error stops throwing

[FEATURE] URL's in Ufora Notifications

Parse <a href="url">SOMETHING</a> tags to [SOMETHING](url).

Example excerpt taken from a random SEL notification for testing:

Bijlagen:</div>\n\t<div style="margin: 0px; padding: 0px;">\n\t\t<div style="margin: 0px; padding: 0px;">\n\t\t\t<div style="padding: 0px; margin: 0px;">\n\t\t\t\t<a href="URL_GOES_HERE" rel="noopener" style="color: #00617f;">Groepslijst_SELab1.pdf</a>

EDIT: this lib exists, use it instead of the dict: https://github.com/matthewwithanm/python-markdownify

Get alot more letters

we just make a server for just letters and spam it with emotes, so didier has alot of options

[FEATURE] Private Messages

Once private messages (whispers) are implemented in dpy, refactor some commands to use these instead of spamming chat or DMing. Remove the original messages calling it as well.

  • Help
  • FAQ
  • Mock

Make memes list paginated

Running out of embed space & it's becoming a bit big, so adding pages (limiting to 10-15 items per page) is probably a good idea. Adding extra memes will also make this a necessity eventually.

didier pin

Usage: didier pin mesgID
Didier will start a vote requiring x yeah votes for the message to be pinned in the current channel.
This will reduces admin spam for pins

Update Corona to include vaccine data

Covid api was updated yesterday to give access to vaccination data. The Corona command should show this, good news should be spread around.

Use days=3 to get info from yesterday & day before (difference) for trends.

Rework Corona

Classes >>>>>>>>>>>>>>> dicts, also move the new code to a separate file because it doesn't belong in the cog

Rework Rob to use classes

Rob is a huge mess and I'm a bit scared to touch it, but they should start using classes. These classes would store all info on a person's profile, with functions that make checks a lot easier to perform. The profiles can be built from the info in the database.

The actual Rob function will become a lot cleaner.

Bank-related functions can also use these classes to clean up a bit.

Add more memes

The id's of memes are shown on the memegen pages of imgflip.

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.