teotwaki / liro Goto Github PK
View Code? Open in Web Editor NEWA Discord bot for lichess and Rosen related things
License: MIT License
A Discord bot for lichess and Rosen related things
License: MIT License
To change it, go to https://discord.com/developers/applications/<client_id>/oauth2/general and update CUSTOM URL
under Default Authorization Link
with the appropriate link, as shown below.
In addition to managing a user's rating range roles, Liro should also hand out "Team YouTube" and "Team Twitch" roles on Discord. This gives users access to private channel based on which team they are part of.
The most basic system could just be to read from Lichess which team the user is part of, and give him a role based on that.
This has a few limitations:
While this isn't the cleanest implementation, it's simple and easy to do, and neither myself nor @CBrocks294 see any major issue with this simple solution.
This would require quite a bit more setup and work, however this would give us more control.
team:write
.Potential segfault in the time crate
Details | |
---|---|
Package | time |
Version | 0.1.43 |
URL | time-rs/time#293 |
Date | 2020-11-18 |
Patched versions | >=0.2.23 |
Unaffected versions | =0.2.0,=0.2.1,=0.2.2,=0.2.3,=0.2.4,=0.2.5,=0.2.6 |
Unix-like operating systems may segfault due to dereferencing a dangling pointer in specific circumstances. This requires an environment variable to be set in a different thread than the affected functions. This may occur without the user's knowledge, notably in a third-party library.
The affected functions from time 0.2.7 through 0.2.22 are:
time::UtcOffset::local_offset_at
time::UtcOffset::try_local_offset_at
time::UtcOffset::current_local_offset
time::UtcOffset::try_current_local_offset
time::OffsetDateTime::now_local
time::OffsetDateTime::try_now_local
The affected functions in time 0.1 (all versions) are:
at
at_utc
Non-Unix targets (including Windows and wasm) are unaffected.
Pending a proper fix, the internal method that determines the local offset has been modified to always return None
on the affected operating systems. This has the effect of returning an Err
on the try_*
methods and UTC
on the non-try_*
methods.
Users and library authors with time in their dependency tree should perform cargo update
, which will pull in the updated, unaffected code.
Users of time 0.1 do not have a patch and should upgrade to an unaffected version: time 0.2.23 or greater or the 0.3. series.
No workarounds are known.
See advisory page for additional details.
Potential segfault in
localtime_r
invocations
Details | |
---|---|
Package | chrono |
Version | 0.4.19 |
URL | chronotope/chrono#499 |
Date | 2020-11-10 |
Unix-like operating systems may segfault due to dereferencing a dangling pointer in specific circumstances. This requires an environment variable to be set in a different thread than the affected functions. This may occur without the user's knowledge, notably in a third-party library.
No workarounds are known.
See advisory page for additional details.
It doesn't look like Discord is changing its mind when it comes to application commands, so they probably need to be implemented at some point. This is the task I'm currently working on.
I've tried playing around with Poise, but I wasn't a fan of how opinionated it is. That's not meant as a diss or anything, it's just that I'm opinionated as well, and our opinions don't really match. I'm sure that if I had started off building liro using Poise, I would be very happy with it.
I'm taking the overly verbose and declarative route that is currently available in Serenity. I'll see if I get around to publishing a branch with my current WIP, although it may not be super interesting. The main part that I'm trying to figure out is restructuring the existing commands and making that mesh with the application commands, so that I don't need to have two parallel implementations of each command.
At the moment we're using a mostly unauthenticated API client when talking to lichess. One minor optimisation we could do is use an authenticated client, which would give us better API rates.
We're not anywhere near the limit of API limits with our current usage, but that kind of thing has a nasty habit of sneaking up on you.
It would be great to be able to support chesscom in addition to lichess.
From an API perspective, chesscom is a bit more limited, however it's not unmanageable:
Location
field of their profile. Once they validate, we fetch the profile and verify the token is there. It requires a bit more manual work on the user's part, however it does prove account ownership.Questions:
It would be great for Liro to be able to create the roles in an automated fashion. One proposal is to have a command like:
/setup 800 2400 100 rapid classical
Breakdown:
rapid classical
the formats for which the roles should be created.This to take into account:
The discord link to invite liro to your server which is in the readme redirects to the "You have successfully invited Liro to your sever" page even if you decline the permissions and click cancel.
it redirects to this page which shows the success animation
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.