kappeh / redstone-squid Goto Github PK
View Code? Open in Web Editor NEWA custom bot designed to manage redstone records.
License: MIT License
A custom bot designed to manage redstone records.
License: MIT License
or fastest
Right now we use Intents.all to not think about it
Right now it just takes VERSIONS_LIST[-1]
as the current version. If the user says 1.20, assume it works in all versions of 1.20.
currently there is no checks. We should store the userID in submitted_by
rather than the username.
Google support webhooks but need to look into that. Not a priority though
Not sure how to get this done because our current Help
class gets the available commands quite fundamentally from the prefix command tree abstracted away from us in discord.ext.commands
and not from the CommandTree
in discord.app_commands
.
The reason why some commands (/submit, /edit) are not hybrid_command
is because I didn't know how to use Context
in place for Interaction
.
https://discordpy.readthedocs.io/en/stable/ext/commands/api.html?highlight=context#discord.ext.commands.Context
https://discordpy.readthedocs.io/en/stable/interactions/api.html#interaction
A simple workaround may be to create an empty, hidden prefix command with the same name and parameters.
We don't escape any user input so the discord bot's embed formatting can break completely by it
This seems to be a very hard problem with dependency on
If we use exact searches instead then it will be easier and just need to write some queries
There a handful of instances where local times are used without time zone information, for example
datetime.now().strftime(r'%Y-%m-%d %H:%M:%S.%f')
Times within the database should be stored in UTC. As such, these should be updated to use UTC, such as
datetime.utcnow().strftime(r'%Y-%m-%d %H:%M:%S.%f') // Edit: NOT THIS ONE
or
datetime.now(timezone.utc).strftime(r'%Y-%m-%d %H:%M:%S.%f')
Unify the API key store location, and make it path independent.
Sometimes I want to do some localized testing on the working file using if __name__ == "__main__":
, but as soon as database is needed then it couldn't get the API key from auth.ini
which is assumed to be in the working directory.
Getting the variables is also very ugly:
url = os.environ.get('SUPABASE_URL')
key = os.environ.get('SUPABASE_KEY')
if not url:
if os.path.isfile('auth.ini'):
config = configparser.ConfigParser()
config.read('auth.ini')
url = config.get('supabase', 'SUPABASE_URL')
else:
raise Exception('Specify supabase url either with an auth.ini or a SUPABASE_URL environment variable.')
if not key:
if os.path.isfile('auth.ini'):
config = configparser.ConfigParser()
config.read('auth.ini')
key = config.get('supabase', 'SUPABASE_KEY')
else:
raise Exception('Specify supabase key either with an auth.ini or a SUPABASE_KEY environment variable.')
EmmetJoe says he has some interest too, maybe we can put Squid into RedstonersPub👀
Right now wiring_placement_restrictions
, component_restrictions
and creators_ign
are stored as a string of comma separated list in the submissions
table. Extract them to a new table for searchability.
I think, may have fixed itself since then due to better code.
Put your feature requests in the comments below.
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.