Commit Graph

48 Commits (17fbb20cdc814e5a9421a96e07e0d2ce51e5a1e9)

Author SHA1 Message Date
Kami 17fbb20cdc Added Twitch multi-channel support
- OokamiPup v2 can now enter sevaral community channels
  - Individual channel settings. By default, all commands are disabled
  - Channel-specific settings allow enabling/disabling individual commands per channel
- Added a few more fun facts
- Minor tweaks and bugfixes
2025-02-16 15:30:17 +01:00
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 0f1077778f New `!funfact`/`!fun-fact` command
- This command returns a random fun fact from a list of over 500 verified fun, surprising, or good-to-know facts, with unit conversions between metric and imperial.
- Also started somewhat on the new Community Engagement Score (CES) system.
  - Currently not implemented to any working degree.
  - Will grant/deduct user scores depending on community engagement and actions overall.
2025-02-14 01:46:24 +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 71505b4de1 *ignore, just wanted to try out a crappy new logo for Discord push events* 2025-02-11 10:56:11 +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 623aeab9fb Fixed (?) a Twitch authentication crash
- The automatic token refresh function crashed after a certain time since last token refresh. This should fix it
2025-02-10 13:02:51 +01:00
Kami 3ad6504d69 mini-vacation update
- Dual logging
  - logfile.log = permanent logfile
  - cur_logfile.log = current run logfile
- Improved logging in general
- Expanded howl replies
- Discord activity logging
- Twitch & Discord chat logging
- Discord slash commands implementation (partial)
- Config file improvements
  - Toggleable log levels
  - Settings separated (terminal and file output)
  - Nesting of associated values
- Fixed "!ping" not fetching correct replies
- Several other minor and major fixes, tweaks and improvements
2025-02-10 12:32:30 +01:00
Kami aed3d24e33 Started implementing Universal User Identification (UUI)
- added database table "users"
- table allows for assigning individual users a UUID for universal processing
- will support account linking in the future

- fixed a bug with reporting Discord commands in logs
2025-02-05 00:33:02 +01:00
Kami 8074fbbef4 Cleaned log code lines 2025-02-04 13:35:25 +01:00
Kami 403ee0aed5 Ensure FATAL logs always go through to console 2025-02-04 13:21:33 +01:00
Kami 1a97a0a78e Reworked logging to optionally log to file as well 2025-02-04 13:16:03 +01:00
Kami 63256b8984 added logo to .gitignore 2025-02-03 23:02:44 +01:00
Kami faea372a56 Cleaned up command execution debug logs for better readability 2025-02-03 23:01:40 +01:00
Kami 87d05d961a Fixed !help not processing certain help sections correctly if example details were missing. 2025-02-03 22:37:20 +01:00
Kami 5730840209 Improved !help
- Ensured it fetches the correct commands and help configuration depending on platform.
- Removed certain duplicate checks that intiated functions twice or repeated value asignments.
- Added the @monitor_cmd flag to commands, allowing easy command runtime diagnostics, including execution time.
2025-02-03 22:02:56 +01:00
Kami 28d22da0c1 + Added !help command
- Removed built-in Discord !help command

NOTE:
Basic implementation.
Help text is defined in:
  - dictionary/help_twitch.json
  - dictionary/help_discord.json
2025-02-03 14:14:30 +01:00
Kami 780ec2e540 - Added basic SQL functionality with SQLite fallback.
- Added basic "Quote" system/command using the new DB feature.
2025-02-03 12:17:55 +01:00
Kami af97b65c2f Added BSL-1.1 license 2025-02-02 16:58:53 +01:00
Kami afa45aa913 Added basic string sanitization 2025-02-02 14:34:30 +01:00
Kami a83e27c7ed - Added automatic reconnect after refreshing Twitch bot token.
- Added reattempt limit to prevent Twitch ratelimiting.
2025-02-02 12:39:53 +01:00
Kami 095514d95d Added howling dictionary with conditional selection 2025-02-02 00:59:53 +01:00
Kami c4e51abc5b Specified platform commands were initiated from 2025-02-02 00:32:38 +01:00
Kami dd05c26b5d Added command logging to console 2025-02-02 00:29:58 +01:00
Kami 1bc5d5c042 . 2025-02-02 00:18:44 +01:00
Kami 29e48907df improved uptime calculation with fewer lines 2025-02-02 00:14:55 +01:00
kami 913f63c43b Add permissions.json 2025-02-01 22:41:27 +00:00
Kami 5725439354 . 2025-02-01 23:40:28 +01:00
Kami c2676cf8c7 Updated .gitignore to exclude permissions.json 2025-02-01 23:39:13 +01:00
Kami 1b9a78b3d6 Added basic permissions system.
Needs to be vastly improved
2025-02-01 23:38:13 +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
Kami 2a977fe76e - Added readme.md 2025-02-01 21:28:26 +01:00
Kami 93e74f24df Merge branch 'master' of https://git.ookamikun.tv/kami/OokamiPupV2 2025-02-01 20:57:23 +01:00
Kami 82aec3dc5f - Reverted logging to a simpler terminal-only
- Added log levels in config.json
- Reworked requirements.txt
2025-02-01 20:50:54 +01:00
kami 4c1ce0e250 Add example.env
Added example .env file
2025-02-01 12:16:51 +00:00
Kami 9727927b66 Stopped tracking .env file 2025-02-01 13:13:17 +01:00
Kami 2192637d91 Fixed unavailable bot_start_time variable for !ping command 2025-02-01 13:09:02 +01:00
Kami 2e33792aa8 Added ping awake replies 2025-02-01 13:04:07 +01:00
kami 6d40b70263 Add .gitignore 2025-02-01 11:24:26 +00:00
kami ed61f35d75 Upload files to "cmd_common" 2025-02-01 11:08:17 +00:00
kami 6a9216e102 Delete modules/utility.cpython-312.pyc 2025-02-01 11:07:52 +00:00
kami ed54bf69ba Upload files to "modules" 2025-02-01 11:07:36 +00:00
kami 72fb3f2a7d Upload files to "/" 2025-02-01 11:07:05 +00:00
kami 6ba99c9a57 Upload files to "/" 2025-02-01 11:06:33 +00:00
kami 424e76db17 Add config.json 2025-02-01 11:05:36 +00:00
kami 7f4d79203b Add .env 2025-02-01 11:04:18 +00:00