phanabani / sandpiper Goto Github PK
View Code? Open in Web Editor NEWA Discord bot that makes it easier to communicate with friends around the world.
License: MIT License
A Discord bot that makes it easier to communicate with friends around the world.
License: MIT License
5' 11" works but 5'11" does not
e.g. "midnight" and "noon"
For example, {9pm australia}
doesn't let the user know what timezone was used (probably something weird because "australia" is not a timezone), which can be misleading.
Allow users to set their birthday without the year. For yearless birthdays, age should be "N/A".
Currently, it finds the target's nicknames in all guilds shared by the executor and the target that Sandpiper can see, which is invasive if not done in DMs.
I'm making privacy fields more important in Sandpiper's operation (age set to public will show it in birthday messages), and I want to notify users about this, so I want to add a way to communicate back to Sandpiper when a database upgrade occurs.
Example:
cc([{
'c-radio--checked': props.field.value === option.value,
}])
We'll probably need to patch asyncio.sleep
somewhere...
Edit: yeah we sure did lol
Currently when using "!piper whois" you have to type a name manually e.g. "!piper whois Malivil"
It would be nice to be able to do "!piper whois @Malivil" to take advantage of the auto-complete
It'll be easier to visually parse long lists of timezone conversions!
they feel very generic
it also feels a bit clunky to have to do for example help timezone, and then look what the commands in it are to then do help timezone set to figure out the formatting for that
It would be cool if it was like a man page where it shows all the commands and their usage by just doing "help birthday"
Examples would be good. Like the stuff you have in GitHub
The general !piper help
could show general info, then have subcommands !piper help conversions
and !piper help commands
.
geoguessr uses yards sometimes and people get confused
This is a bug on the android app. I could add a mobile flag to commands to render these messages in monospaced blocks rather than the embeds. I looked into getting the user's mobile status to automatically change rendering style, but this would have way too much overhead (and has unknown behavior if the user is on both mobile and desktop).
I want to be able to define a config file's structure as a class with fields using type annotations.
{}
)Sometimes I want to know what time it is for people in the server so have a "{now}" conversion would be useful
Specify unit output with imperial shorthand e.g. 150cm -> 4' 11.04"
Enable/disable sending their birthday notification
Setting to display age in notif? Maybe this could be controlled by age privacy
I'm reconsidering these two issues. I think it's most logical to have the privacy settings control what data gets accessed by the birthday alerts module. For example:
However, is it intuitive that having your age as public means it will be announced? It doesn't seem so, and I think many people might not enjoy having their age displayed like this. The solution I was already thinking about is to add a NEW setting for displaying age, but that seems redundant/extraneous along with the privacy.
We could instead give more explicit hints to the user about what's going on when they set their data. For example, here's a diagram of possible a command flow:
Birthday privacy == private
Birthday privacy == public
Age privacy == private
Age privacy == public
Birthday privacy == private
Birthday privacy == public
Birthday privacy == private
Birthday privacy == public
Age privacy == private
Age privacy == public
I think this is a state machine. It probably doesn't need to be more complicated than a few nested conditionals but maybe look into that.
Originally posted by @Phanabani in #14 (comment)
It currently parses a single word or a quoted string.
Currently, it is possible to specify an input timezone like {5pm amsterdam}
or {17:00 amsterdam}
. {17 amsterdam}
or {1700 amsterdam}
does not work because we defer to a unit conversion when there is no colon or AM/PM period specified in the numeric section. This rule is not transparent, however, and has been a source of confusion for users.
The reason I've done it this way is because I think specifying a unit is a higher priority action than specifying an input timezone, since it's more common for a user to use their default timezone, and unit conversion is a core feature. Additionally, the fuzzy timezone matcher uses a partial token scorer, which means substring matches have very high precedence in scoring fuzzy matches and will easily match simple unit strings (5 km
would 100% match a timezone with a name like "Akmo"). This scorer returned the most natural results during testing, so it is not up for changing.
One solution would be to run another pass at the timezone converter after failing a unit conversion ({17 amsterdam}
returns an error "'Amsterdam' is not a recognized unit"), but the downside to this is that unknown unit errors will silently be discarded. I think meaningful error feedback is important and that this solution is undesirable.
Another solution may be to implement a more intelligent algorithm for determining whether a suffix is supposed to be a unit or a timezone. Though, thinking about it just now, that is also undesirable because some units which aren't handled by default have long snake_case names, such as boltzmann_constant. Is there really any way to reliably distinguish between a string like this and a timezone name? I feel it is very important to support uncommon units like this because it feels honestly like magic when the conversion of a weird unit just works out-of-the-box, and as a user myself I really enjoyed that feeling.
I just had another idea, perhaps I could do a similar approach to the two-pass time conversion idea, but for first use the current, more natural partial-token scorer, while the second uses a full token scorer. This retains the algorithm of the current implementation, but adds a very high threshold timezone match as a last resort. If the last resort timezone match fails, we can pretend it didn't happen and raise the unknown unit error. This will increase the domain of valid time conversion inputs without sacrificing units.
Output top 5 (or more?) fuzzily-matched timezones. Also allow lookup by country name.
Something like {9pm amsterdam}
. This might conflict with unit conversion, as there could be an ambiguities.
Input | Expected | Actual |
---|---|---|
9 degC |
9 degrees Celsius | 09:00 in timezone "degC" |
Could require either a period specifier (AM/PM) or 24hr time to prevent ambiguity.
Have a way to normalize pronouns so they can be used in birthday messages.
If the bot starts up mid-day, I think it should announce any birthdays for that day even if it's past the birthday midnight. We need to make the birthday announcements atomic then, such that birthdays are announced once and only once, even if the bot restarts.
Example of {5pm > Europe}
doesn't say which timezone was actually found and used.
Like {5 Kelvin > Celsius}
, {5 Fahrenheit > Celsius}
.
It's safer and easier than pip+venv!
Methods added in 24dd34f need to take timezones into account to calculate the user's age (default to UTC for user).
Create an onboarding system to help make it super easy for users to get started with Piper.
Use discord's reply feature to reply to users' commands (useful when many people are invoking commands at once).
People might try to abuse the birthday notification system by repeatedly setting today as their birthday each day, spamming birthday notifications.
When a user edits a conversion, Sandpiper should pick up on this and edit her reply with the new conversion. Likewise, if a user deletes their message with a conversion, she should delete her reply. The deletion could also be a config field.
When the user has no data stored in the database, using any of the show commands causes an error.
I want access to more typing features!!
Convert between different currencies {$5 > euro}
.
If no user has stored their timezone, time conversions will try sending an empty message.
Typing something like birthday hello
should tell the user it's an unknown command, rather than not saying anything like it does now.
Currently reports "user not found". Should instead say something like "Please don't ping a user in Sandpiper commands. You can just type their name without the @".
See #22.
We've had lots of problems on my server with people not understanding command syntax, and it's really difficult to troubleshoot with them when they have to go back and forth to DMs. There should be an option to allow public info changes rather than forcing users into DMs.
I think this is a reasonable option because users still will have the option to DM if they're uncomfortable, and they (should?) have the option of deleting their public messages. Perhaps have a sort of "onboarding" for new users setting info to be like "hey, you can also set your personal info in DMs if you want".
User lookup should be the same as how whois
works. It may return multiple users.
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.