pumpkin-py / pumpkin-fun Goto Github PK
View Code? Open in Web Editor NEWFun modules as extensions of pumpkin.py bot framework
License: GNU General Public License v3.0
Fun modules as extensions of pumpkin.py bot framework
License: GNU General Public License v3.0
The weeb module is not working, because the api is protected by cloudflare and have ddos protection by captcha (mostly skip without challenge). This causing api to return 403 error. There is need to wait for captcha challenge to success and api should return 200 again.
Here will be needed some investigation how to go around this api limitation and implement it.
Port the random cog to this pumpkin.py repository.
Required changes:
aiohttp
is used instead of requests
Feel free to reach out for clarification.
Several commands are taking user input, but displaying its newlines can mess up the input. Some examples are:
Doing .replace("\n", " ")
should be enough.
Marlboro regular does not include some letters with diacritics like č
fallback with ASCII character would be nice, or port some letters using existing ones if that is an option.
It is possible to port some letters relatively easily using fontforge
like č
, Č
, Ď
. Some other like ĺ
, ľ
would be harder.
The current output of Weather module does not contain rain probability or milimeters of rain. I can try to implement this function into the current module.
In current situation if you want to use urban with phrase, you must put it into quotes, otherwise it says that it takes only one argument. The solution is to make the argument greedy (consuming all strings into one)
We had ?fish
command in our previous bot, Rubbergoddess. Our folks quite enjoyed it.
You can take an inspration from its code, from Virtual Fisher bot or just think of something new. The module should support fishing, multiple fish types, extra stuff (think Minecraft's fishing system), inventory...
It could also work on the principles of Discord's Trick-or-Treat bot; you could start fishing and after a random amount of time an embed would show up, and you would have to claim it before it gets lost again.
It could also be an opportunity for custom-drawn images.
We are pulling the images with requests. We should use aiohttp instead.
We need to migrate the Weeb cog from Amadeus to Fun (as Weeb submodule).
See the cog here.
The cog doesn't use a database and is using the Nhentai API so this will be fairly a easy port.
Please rewrite using the aiohttp
library instead of requests
. Do not use the legendary hentai
library as it uses requests
which would slow the bot down.
Feel free to rewrite any part of the cog to make it better/more readable
Weighted version of 'pick' (may be 'weighted-pick' as an alias).
This command would take a list of arguments, prefixed with an integer, separated by semicolon.
30:a 20:b 50:c
would have 30% probability of returning a, 20% probability of returning b, and so on.70:a b c
would have 70% probability of returning a, and the rest would be split: 15% for b and 15% for c.Sums over hundred should be allowed, but probabilities of items with no prefix would have a probability of 0%:
60:a 120:b c
would have 33% probability of a, 66% of b, and 0% of c.Actual database is highly ineffective. Every interaction is now getting inserted into DB and count is determined by COUNT(*) over all records.
This could be solved by adding value
column. This column would agregate same type, giver and receiver interactions, which would decrease usage of space.
Port the seeking cog to this pumpkin.py repository.
Required changes:
Feel free to reach out for clarification.
There are multiple Joke APIs:
The command should pick one of them (if they published number of jokes in their database, we should use them to make weighted random pick so we get all jokes with the same probability) and display it in an embed, just like 'dadjoke' does.
Hi when using pick command there were discovered incorrect behavior of this command. The problem is that the (https://github.com/pumpkin-py/pumpkin-fun/blob/main/rand/module.py#LL60C18-L60C18)[code] looking for ?
but it's not depend on position where it's located.
For example:
-pick Monday Wednesday? Friday
It saying that there is not enough arguments, which is incorrect as there are 3 args.
When used this:
-pick Maybe "Did I drink enough?" Yes No
It just take last 2 arguments (yes and no) and Maybe is omitted.
In my point of view only the first argument should be checked if contains ?
.
Possible workaround is use backtick ( ` ) for example
-pick Monday 'Wednesday?' Friday
msgid at this line needs capital "I" and a dot after the sentence
Line 40 in ab94587
Don't use green, use orange or something.
There should be a limit on how many days the item can last. The default should be 90 days. I'll leave it up to the person taking this if the limit should be configurable guild-wide, or if it should be hardcoded. Either will do the job.
Port the librarian cog to this pumpkin.py repository.
Required changes:
Feel free to reach out for clarification.
I've pre-made the database part of the module. This issue is intended to our "junior" developers, so they only have to recreate the API and user feedback part.
Instead of using the API Rubbergoddess uses, I'd recommend you to look into https://wttr.in/:help. It has JSON API output we could use, and we could add forecast as well (maybe as two-page ScrollableEmbed?).
It also has the v3.
API interface, which could be use to add third page with a map of the area around (see the docs).
Optionally, the API should be contacted with Accept-Language:
header with user's/guild's language preference, so the strings are localized.
The PR should target the weather
branch, not main
.
From what I've seen and heard, the Weather API that is now used is highly inaccurate.
I've been recommended to switch to https://yr.no/ (https://developer.yr.no/doc/).
Good thing is, there's already python package, that supports this API: https://pypi.org/project/python-yr/
Create a command that would take one user image and "deepfry" it -- apply some deformations, hue and/or color shifts (use your search engine of choise for inspiration).
Use Attachment converter to load the image from the message.
-spank My_Nick
should work the same as -spank
(when the author of the message is My_Nick).
This should apply to all other Fun features as well.
If you !highfive member in Thread, it says "You can't do that, they are not in this channel." even if that member is participating in thread.
Port the actress cog to this pumpkin.py repository as 'macros' module.
Required changes:
Feel free to reach out for clarification.
...with maximum of 10-15 items per page.
API endpoint https://randomfox.ca/floof.
Port the meme cog to this pumpkin.py repository.
Required changes:
Feel free to reach out for clarification.
There is no need to allow place names over 20-30 characters, they will most likely be spam.
I'm not sure if it should be settable by admin, hardcoded number or something dynamic based on # of channel/server member count (more users -> less spots).
I think it would be great to have --match option for REGEX.
After the second user confirms the highfive
call the output could look something like this:
User 1 つ <reverse つ> User 2
It's possible to input URL special characters in the picsum command here:
size: str = "900/600"
url: str = "https://picsum.photos/"
if seed:
url += "seed/" + seed + "/"
url += f"{size}.jpg?random={ctx.message.id}"
Something like ../id/870/200/300?blur=2#
works. Simply URL encoding input fixes the issue.
'set' and 'unset' options should have a confirmation embed. The user should be shown their new nickname (in case of 'set'), the karma price. They should be able to both confirm and deny the action.
Similar to the 'cat', 'dog' or 'fox' command, there should be a 'duck' one.
API documentation available at https://random-d.uk/api.
When A hugs B, a simple hug emoji is sent:
(⊃・‿・)⊃ **name B**
The improvement: if B replies to A within some time period (one minute?), a more complicated emoji could be sent of both of them hugging:
**name A** (⊃・‿・)⊃\(・‿・)⊃ **name B**
Port the animals cog to this pumpkin.py repository.
Required changes:
Because of legal reasons (see General Data Protection Regulation), this should be opt-in.
When the 'randomcase' argument starts with an asterisk *
, it will cause multiple backslashes to be printed before the text itself:
- *foo*
~ \\\\\\\\\\\\\\\*foo*
We want to keep the formatting, the only thing that should be disabled is tagging users.
We need to migrate the Urban cog from Amadeus to Fun (Urban submodule).
See the cog here.
The cog doesn't use a database, just the unofficial Urbandictionary API. There's also a couple of python libraries you can use as wrappers but the implementation is so simple I don't think it's necessary to use a library for this. This will be fairly a easy port.
Feel free to rewrite any part of the cog to make it better/more readable
Instead of simply taking a list of arguments
async def pick(self, ctx, *args):
update the code so that the first two arguments are required. This will force the users to add at least two arguments to be picked from. It should still be possible to submit an unlimited number of arguments.
Currently the animations are being created from nothing. To optimise the gif functionalities (whip, pet, ...) we should come up with some kind of caching (so the images are saved for offline use). The problem is invalidation -- time-based? Event-based (what happens if an event comes when the bot is offline?)? FIFO based (only keep last n animations?)? A mix of them?
Port the shop cog to this pumpkin.py repository.
This module depends on Karma module and should refuse to start without it. This issue is thus being blocked by pumpkin-py/pumpkin-boards#4.
Required changes:
Feel free to reach out for clarification.
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.