Commit Graph

6 Commits (6da17449906018ad381d23023f1bafca203de3dc)

Author SHA1 Message Date
Kami 6da1744990 Added search feature to `!funfact`
- Users can now search for fun facts using `!funfact search [keywords]` without brackets. Returns best match.
- Also added some new facts
- Minor tweaks to force-sync of Discord slash commands
2025-02-14 11:42:20 +01:00
Kami 01f002600c Bug tracking, minor tweaks
- Moved some constants to the globals.Constants class
  - config_data: returns the configuration dictionary
  - bot_start_time: returns the epoch bot start time
  - primary_discord_guild: returns a dict like `{"object": primary_guild_object, "id": primary_guild_int}`
  *These is initiated under globals.constants*
- Improved on docstrings. Google format now standard
- Reverted all commands to purely textual until further notice
  - `/help` is still additionally available as a slash command
2025-02-12 23:14:40 +01:00
Kami 1b141c10fb Big quote system overhaul
- Returned "quote" commands to textual commands type
- Rewritten quote system backend to ensure stability
- Added new quote subcommands:
  - `!quote search [keywords]` allow users to search for a quote using keywords, and returns the best match. If several equally good matches are found, returns one of them at random
  - `!quote info [quote_id]` allows users to see more info about a given quote. Grants more information on Discord
  - `!quote restore [quote_id]` allows users to restore a previously removed quote
  - `!quote last/latest/newest` allows users to get the newest quote
- Added new quote features to Discord helpfile
- Moved database init to globals.init_db_conn
- Associated unlinked usernames now default to that of the other platform, appended with "({platform} unlinked)". This should ensure consistensy despite users not linking accounts in the UAL system
- Added time_since(start, end, format) function to easily get formatted time differences, eg. for execution time reporting
- Added "wfstl" and "wfetl" helper function under utility. Useful for debugging when a function starts and ends manually if needed.
- Minor tweaks, corrections, bugfixes
2025-02-12 00:15:39 +01:00
Kami 66f3d03bc6 Program logging rework
- Logging functionality has been centralised to 'globals.log'

This should allow easy log integration into subsystems without the need of passing the function everywhere *phew*
2025-02-11 10:47:48 +01:00
Kami 699d8d493e Added latency to "ping" command
Ongoing bugfix for slash commands (#6)
2025-02-10 21:05:20 +01:00
Kami 9ef553ecb0 - Added dictionary functionality
- Looks up a file in the "dictionary" folder
  - Returns a random category string within that file
- Added proper start time fetching through globals.get_bot_start_time()
2025-02-01 22:54:10 +01:00