no767 / kumiko Goto Github PK
View Code? Open in Web Editor NEWA multipurpose Discord bot built with freedom and choice in mind
Home Page: https://kumiko.readthedocs.io/en/latest/
License: Apache License 2.0
A multipurpose Discord bot built with freedom and choice in mind
Home Page: https://kumiko.readthedocs.io/en/latest/
License: Apache License 2.0
sorry ellie it's time to move to debian not alpine
maybe django api, or fastapi. This will be used to retrieve assets from the api in order to then give back to the user
explains itself
Each guild will need to set up their own "server account" and feed it with a set amount of money (maybe coming from their own accounts). and the owner can create different "quests" that would allow for the users to complete. like it could be earn this much coins, or etc. this allows for far more engagement with the users, and allows for freedom and control over it
some will probably use this to add some inappropriate stuff, so this is meant to prevent that
You can probably reduce and make the lines of code cleaner in the embing on top-gg.py
embedVar.add_field(
name="Long Description",
value=str(getOneBotInfo["longdesc"])
.replace("\r", "")
.replace("\n", ""),
inline=False,
)
embedVar.add_field(
name="Short Description",
value=getOneBotInfo["shortdesc"],
inline=True,
)
embedVar.add_field(
name="Prefix", value=getOneBotInfo["prefix"], inline=True
)
embedVar.add_field(
name="GitHub",
value=str(getOneBotInfo["github"])
.replace('"', "")
.replace("'", ""),
inline=True,
)
embedVar.add_field(
name="Website",
value=str(getOneBotInfo["website"])
.replace('"', "")
.replace("'", ""),
inline=True,
)
embedVar.add_field(
name="Invite",
value=str(getOneBotInfo["invite"]),
inline=True,
)
embedVar.add_field(
name="Points",
value=str(getOneBotInfo["points"]),
inline=True,
)
embedVar.add_field(
name="Certified Bot",
value=str(getOneBotInfo["certifiedBot"]),
inline=True,
)
embedVar.add_field(
name="Owners",
value=str(getOneBotInfo["owners"]).replace("'", ""),
inline=True,
)
embedVar.add_field(
name="Tags",
value=str(getOneBotInfo["tags"]).replace("'", ""),
inline=True,
)
await ctx.send(embed=embedVar)
Something like
for key, val in getOneBotInfo.items():
embedVar.add_field(
name = key,
value = val.replace("\r", "").replace("\n"),
inline=False,
)
could probably do the job
No response
No response
Currently there is no way to save the items into the user's inv, thus rendering the marketplace useless
Here's a list of stuff that needs to be done before Kumiko v0.4.0 goes live. This list will be changed and new ones will get added later on
saves to the postgres db, and allows admins to check for bans and stuff
JSON may bring some performance hits, so this is needed to optimize performance. half of it is already done. will need to actually implement the methods into the purchasing transactions and inv commands
This is done to keep the spammers away, and to make the people who want to use it to look foward to it
No response
No response
There should be an option to use a /admin warn
to warn a user of their actions. This will get logged and would be available for the moderators to look at
This was an idea from one of my friends, which to include a system to allow users to basically get items or characters. This will probably not be integrated within the economy system, since it makes no sense to do so. will require postgresql db for user inv storage
This time it would be properly done
This needs to be done manually
The GWS is almost done. here's a checklist of the stuff that needs to be done before it is complete:
ws_data
in the postgres dbws_data
table in the PostgreSQL DBThis is what most other apps do. This will cut off on the amount of env vars needed to be passed in
The current idea is to run the postgres-init script (or another one that is very similar more than likely) and copy that along the bot file. Then we only run that script when the docker container is first started up. This essentially "seeds" the database and creates the table automatically
There is a reason behind this move. Writing out a ton of methods for SQLAlchemy ORM for Kumiko takes way too long and isn't as easy to build. So the idea is to use something like Tortoise ORM. Much faster, and meant for asyncio. SQLAlchemy ORM async is basically a shoehorned version of their sync version, but instead just using their async sessionmaker instead. SQLAlchemy ORM is way way too slow for Kumiko now, so the most logical decision is to go to Tortoise ORM
This should help with reducing the amount of data sent to Redis, and will help with thr performance generally (network wise)
Kumiko needs to have her commands organized. So this means we need to sort them and to make sure that they are in logical order
List of stuff that needs to be done:
hi, I created a postgress server on proxmox with all needed in .env
when I start command from /scripts
python postgres-init.py
I get fault.
root@ubuntu:~/Kumiko/Bot# cd ..
root@ubuntu:~/Kumiko# cd scripts/
root@ubuntu:~/Kumiko/scripts# python postgres-init.py
Traceback (most recent call last):
File "/root/Kumiko/scripts/postgres-init.py", line 42, in <module>
asyncio.run(main())
File "/root/.pyenv/versions/3.10.6/lib/python3.10/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "uvloop/loop.pyx", line 1501, in uvloop.loop.Loop.run_until_complete
File "/root/Kumiko/scripts/postgres-init.py", line 34, in main
await utils.initUserTables(uri=CONNECTION_URI)
File "/root/Kumiko/Bot/economy_utils/eco_user.py", line 49, in initUserTables
engine = create_async_engine(
File "/root/.pyenv/versions/3.10.6/lib/python3.10/site-packages/sqlalchemy/ext/asyncio/engine.py", line 43, in create_async_engine
sync_engine = _create_engine(*arg, **kw)
File "<string>", line 2, in create_engine
File "/root/.pyenv/versions/3.10.6/lib/python3.10/site-packages/sqlalchemy/util/deprecations.py", line 309, in warned
return fn(*args, **kwargs)
File "/root/.pyenv/versions/3.10.6/lib/python3.10/site-packages/sqlalchemy/engine/create.py", line 518, in create_engine
u = _url.make_url(url)
File "/root/.pyenv/versions/3.10.6/lib/python3.10/site-packages/sqlalchemy/engine/url.py", line 725, in make_url
return _parse_rfc1738_args(name_or_url)
File "/root/.pyenv/versions/3.10.6/lib/python3.10/site-packages/sqlalchemy/engine/url.py", line 781, in _parse_rfc1738_args
components["port"] = int(components["port"])
ValueError: invalid literal for int() with base 10: 'None'
root@ubuntu:~/Kumiko/scripts#
inside .env in /Bot directory
POSTGRES_PASSWORD = "password"
Postgres_IP = 192.168.87.5
POSTGRES_USER = "kumiko"
Postgres_Database = "kumiko_eco_users"
When I go to the Database ip, I can login.
regards Remco
This is in fact rlly simple. Take the user's id (use regex to parse), and then search it up. then make an embed with that image
might replace the crime commands, since this kinda steals the idea from dank memer. but why not have an event once in a while where the whole marketplace gets auctioned. basically a way to reset the marketplace?
No response
later on add a way to form companies and trusts
also will need that
This way, all we need to do is to pull the connection pool object from the internal memory, and then connect to redis that way. This just implemented into Xelt.py, so might as migrate the idea over to Kumiko
Since each user will probably bid for the price, it's better to save that data onto Redis. then every 5 mins or so, it'll commit the data into postgres. This guarantees data persistence, while also achieving massive performance gains
This basically prevents spammers from listing items on the marketplace
This one is not tough, but more than likely going to take a very long time to do. each image should either be a jpeg or png, and the filename is the uuid of that item in the database. that way, it would be much easier to get it
Each user first starts off at rank 0. This determines what they can do. they can do like obtain jobs for their rank, etc. And with more wealth, and time spent using the economy system, their rank increases. upper ranks can access stuff like the auction house, and many other stuff. Higher ranks can also allow access to better paying jobs, etc. It's just like an xp system actually
Copied from #83
The idea behind this IPC server, which will be written using Quart, is that there is an Inter-Process Communication between the Quart server, and the bot. This way, we can send messages through and back, therefore gaining the ability to control the bot from the web rather. This, coupled with the Spring Webflux mircoservices and complex infrastructure plans, will surely be a stable enough system to hold the masses
generally should smooth out a lot of stuff
No response
hopefully will speed up dev environments
Planning to release v0.4.0 soon. So the codebase needs to be stabilized in order to have a prod release (despite being in v0 alpha) soon. v0.4.0 ideally should be released in 2-3 weeks
Cogs to go over:
users.py
quests.py
petals.py
auction_house.py
marketplace.py
(just have to go over the purchase cmd)admin.py
gws.py
No response
Basically taking the idea from owo bot. There can be a daily lootbox system, where users can come back every single day, and get something new. and they can build up their inventory over time. unrelated to the economy system, or may be merged with the economy system
There are a bunch of stuff that needs to be addressed, and remade
Anais u were the one to lead me to petpet
Reference: https://benisland.neocities.org/petpet/
This is pretty easy to do. Use Tenor's API (Rin already natively supports it), and search up a image of a hug. Then just do some formatting with the username (set the title to be like person a hugs person b, message here). Then send the whole entire thing as an embed
Just like dank memer, there should be commands added to earn coins via crimes (mainly theft, and drug dealing)
IM NOT ENDORSING THE USE OF DRUGS, OR THAT COMMITING CRIMES IS FINE. PLEASE DO NOT DO ANY OF THE THINGS IN REAL LIFE
Current roadmap and tasks that need to be done
<> and HTTP(S) links will not work when adding a item to the marketplace. This is done to prevent spam links being put in (eg when someone decides to list a item with the title being the link to pornhub), and brackets are used to prevent XSS (Cross-Site Scripting) attacks from being used
Currently not allowed:
Would be nice to have a jobs system. This jobs system is really what sets Kumiko apart from most multipurpose bots with an economy. Especially on how the ranks system works.
Moving forwards with the implementation, here are some ideas to be considered:
And here is the general checklist:
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.