Commit Graph

176 Commits

Author SHA1 Message Date
c186c9c576 Improve bot info page
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-22 21:32:20 +01:00
c7208eef84 Make botinfo support both slash and message commands
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-22 21:02:48 +01:00
89fc2aa0a6 Bump version to 0.3.1
All checks were successful
continuous-integration/drone/push Build is passing
The bot is now in a semi-stable state, although still very lacking in terms of features.
2022-11-22 20:51:23 +01:00
96ea29b103 Reduce bot name to just Hideko
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-22 20:50:53 +01:00
4015aecc99 Make coinflip support both slash and message commands
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-22 20:50:37 +01:00
ff80e754ff Add comment 2022-11-22 20:42:47 +01:00
3f1835e059 Move clearchat command to base class
All checks were successful
continuous-integration/drone/push Build is passing
The "clear" command now supports both slash commands and message commands, having identical behavior in both situations.
2022-11-22 20:39:55 +01:00
ecdb0c73e8 Add tiny comment
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-22 17:27:56 +01:00
655840dc82 Implement basic permission check for message commands
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-22 17:08:31 +01:00
11e4a07698 Refactor objects package
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-22 16:41:08 +01:00
a7ac446b0b Remove the need to register slash commands separately
All checks were successful
continuous-integration/drone/push Build is passing
We modified the slash command interface to allow getting command data, and created a generic implementation of it that automatically retrieves data from the command data. The interface should not be used now. Instead, extending the implementation is preferred as it provides a semi-working command already.
2022-11-22 16:40:02 +01:00
ee263a1297 Bump version to 0.3.0
All checks were successful
continuous-integration/drone/push Build is passing
We finally reached a good status for the bot's internal structure, and can actually focus on features now. We also dropped the -slash tag because it's not restricted to slash commands anymore.
2022-11-22 16:20:28 +01:00
a9790b3525 Complete message command parser and listener
All checks were successful
continuous-integration/drone/push Build is passing
The message command listener is now completed and the bot now also supports message-based commands with multiple aliases.
2022-11-22 16:19:08 +01:00
501b1bc71c Bump version
All checks were successful
continuous-integration/drone/push Build is passing
Up to 0.2.8 because we are close to 0.3.0 since we made slash commands interfaces and a better command listener. However, we're still missing interface for command auto-completion and we should probably also register commands on discord's api from our interface instead of storing them again in a separate class.
2022-11-22 14:55:47 +01:00
244e8ace76 Remove redundant API command fetcher
All checks were successful
continuous-integration/drone/push Build is passing
We have our own command listener now, so we don't need to rely on Discord's slow API.
2022-11-22 14:53:46 +01:00
526880e1f1 Start implementing message-base commands
All checks were successful
continuous-integration/drone/push Build is passing
Slash commands can't be used for everything, so we need something to fall back on.
2022-11-22 14:40:44 +01:00
882c695484 Make slash commands interface and load them dynamically
All checks were successful
continuous-integration/drone/push Build is passing
Slash commands are now loaded dynamically by implementing a SlashCommand interface and storing them in a loaded commands map.
2022-11-22 14:32:22 +01:00
7ae4790d5c Add bot owner info to botinfo command
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-22 00:45:58 +01:00
51de18206e Refactor clearchat class 2022-11-22 00:35:10 +01:00
d3db53a451 Cleanup imports 2022-11-22 00:34:37 +01:00
656dff4b26 Refactor packages
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-22 00:31:52 +01:00
8faa9c4677 Refactor datasource classes
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-22 00:28:33 +01:00
f9e1578899 Fix heartbeat error not always being logged
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-22 00:12:24 +01:00
72115cbec2 Bump version
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-22 00:08:36 +01:00
843ee43275 Finish implementing configuration file
All checks were successful
continuous-integration/drone/push Build is passing
Configuration file is now fully functional.
Startup arguments for bot token and heartbeat key have now been removed.
2022-11-22 00:04:34 +01:00
b6bf366822 Allow reading values from config
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-21 23:36:42 +01:00
c650caa090 Finish configuration init method
All checks were successful
continuous-integration/drone/push Build is passing
This method runs every time the bot starts, and ensures that all values are always present in the config file.
2022-11-21 23:28:33 +01:00
f74ae43673 Refactor Config class
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-21 20:20:11 +01:00
e396ce6417 Start implementing yaml loading
Some checks failed
continuous-integration/drone/push Build is failing
2022-11-21 20:20:03 +01:00
66d27fe1fe Start implementing config file 2022-11-21 20:04:28 +01:00
d9d0ce3236 Bump version
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-21 19:55:04 +01:00
a5ddbf0d2e Implement heartbeat for uptime monitoring
All checks were successful
continuous-integration/drone/push Build is passing
You can now monitor the bot's uptime via any external tool that supports push heartbeats. The bots sends a GET request every 30 seconds to show that it's online. The URL is hardcoded for the moment, but very easy to change.
2022-11-21 19:54:49 +01:00
0bcb5d58f4 Set message expiration time to 15 seconds
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-21 19:11:18 +01:00
531ff66bae Bump version
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-21 19:07:49 +01:00
da511f2913 Database overhaul to fix #3
All checks were successful
continuous-integration/drone/push Build is passing
We are now tracking whether messages are sent privately on in a guild, and acting accordingly.
2022-11-21 19:07:34 +01:00
0aec543a46 Bump version
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-21 16:28:31 +01:00
326ad68e38 Add emoji to invite command button
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-21 16:24:21 +01:00
163619a7f8 Improve registered commands caching
All checks were successful
continuous-integration/drone/push Build is passing
Discord's API is slow in updating and registering new commands, so we set up a runnable to periodically check.
2022-11-21 16:24:09 +01:00
b015fddf3c Make invite command nicer
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-21 16:11:16 +01:00
5e4e438340 Make minimal text changes 2022-11-21 15:59:27 +01:00
b35b962ac6 Implement basic say command
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-21 15:37:12 +01:00
4382f7d490 Fix issue tracker link
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-21 15:17:03 +01:00
3038be9a28 Actually register help command
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-21 15:14:57 +01:00
24bb560d93 Register help command
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-21 15:13:32 +01:00
78d5bd6beb Make some messages nicer 2022-11-21 15:07:46 +01:00
3ff154eec6 Rename methods
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-21 15:04:12 +01:00
e9f475cb59 Refactor code and packages
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-21 15:02:40 +01:00
cdc45d62f2 Move uptime string generator to config class
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-21 15:00:37 +01:00
6998cc92e5 Bump version
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-21 14:55:01 +01:00
996cedb154 Finish botinfo command
All checks were successful
continuous-integration/drone/push Build is passing
I don't know what else to add, and it looks nice now.
2022-11-21 14:54:45 +01:00
d2caccf080 Finish uptime string generator 2022-11-21 14:44:48 +01:00
79c8f1a95e Start implementing bot info command
Some checks failed
continuous-integration/drone/push Build is failing
2022-11-21 12:19:35 +01:00
6e9291c535 Implement messages error handling in database
All checks were successful
continuous-integration/drone/push Build is passing
Invalid messages will now be purged from database (if bot was kicked from a guild, if a channel was deleted, ...).
2022-11-21 11:23:52 +01:00
083fef3911 Fix expired coinflip channel id bug
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-21 11:19:23 +01:00
f73b489844 Bump version
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-21 11:15:23 +01:00
0da3eecd29 Restrict reflip button to user who ran the command
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-21 11:14:07 +01:00
7562e956bc Remove leftover debug log
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-21 00:29:22 +01:00
97980f8ed9 Bump version
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-21 00:28:51 +01:00
5ee7321978 Implement functional reply tracker
Now, with commands that support it, only the user who ran the command/triggered the interaction can use its buttons.
2022-11-21 00:27:57 +01:00
98a162a33b Implement SQLite database solving #1
All checks were successful
continuous-integration/drone/push Build is passing
A new basic database has been laid out, with support for message expiry and disabling buttons for old messages.
2022-11-21 00:14:13 +01:00
7ffd3442c2 Remove code duplication in coinflip command 2022-11-20 22:23:26 +01:00
3a5b2a23c1 Add clearchat dismiss button 2022-11-20 22:23:14 +01:00
3d626bb46f Move command handling out of constructor, add coin reflip command
All checks were successful
continuous-integration/drone/push Build is passing
Having heavy code run in a constructor is bad practice. We made separate methods for command handling.
2022-11-20 22:09:58 +01:00
c44251ddb7 Move avatar resolutions to config class
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-20 19:00:27 +01:00
913e8e023a Refactor command packages
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-20 18:56:57 +01:00
3474593dc9 Implement command force-refresh arg
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-20 18:54:13 +01:00
3578de17c8 Implement avatar resolution autocomplete
Some checks failed
continuous-integration/drone/push Build is failing
2022-11-20 18:53:28 +01:00
679d16e1fa Change avatar embed format
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-20 18:22:32 +01:00
33d81acc64 Improve internal documentation
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-20 18:11:00 +01:00
044445890f Improve avatar command
All checks were successful
continuous-integration/drone/push Build is passing
Avatar command now produces an embed with links to all possible resolutions
2022-11-20 18:06:07 +01:00
3e1ba12314 Implement avatar grabber command
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-20 17:19:40 +01:00
4817bacf5c Improve invite command
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-20 16:20:50 +01:00
18db0282d5 Implement invite link command
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-20 16:07:04 +01:00
b14850acaa Bump bot version
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-20 06:15:14 +01:00
e592111d1b Update base JDA version
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-20 06:13:52 +01:00
cd46d601ec Remove pause feature
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-20 06:07:25 +01:00
c6ee0f3ae1 Sort commands alphabetically
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-20 06:05:07 +01:00
f156727413 Optimize imports
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-20 06:04:34 +01:00
a2c1944a32 Move to class-based command handling
All checks were successful
continuous-integration/drone/push Build is passing
Having everything in a single class is bad practice, so different classes for each command were made.
2022-11-20 06:04:00 +01:00
dd4ffe252e Add command to stop bot process
All checks were successful
continuous-integration/drone/push Build is passing
Previously, anyone could send the keywords in chat and kill the bot. Now, only the set bot owner can run the command.
2022-11-20 05:57:58 +01:00
bd76562bcc Remove "flip a coin" message-command
All checks were successful
continuous-integration/drone/push Build is passing
We have /coinflip now
2022-11-20 05:48:31 +01:00
cc671499cd Fix null argument error in clearchat
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-20 05:47:29 +01:00
96953bddcb Make messages prettier
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-20 05:43:17 +01:00
7d9c820243 Implement fully functional clearchat command
All checks were successful
continuous-integration/drone/push Build is passing
The command now supports potentially-infinite message deletion and exception catching (eg messages older than 2 weeks). No longer limited to 100 messages per run.
2022-11-20 05:33:04 +01:00
e1ecc310cc Remove dangerous old clearchat message
All checks were successful
continuous-integration/drone/push Build is passing
Previous clearchat message had no permissions set (it was just a demo) and didn't support slash commands.
2022-11-20 03:53:53 +01:00
fca7c2d26f Fix command registration
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-20 03:52:15 +01:00
813107a2f9 Attempt to fix commands getting unregistered
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-20 03:49:53 +01:00
bfb4aae2aa Register clear command 2022-11-20 03:42:59 +01:00
f2dc70569d Implement basic clear-chat slash command 2022-11-20 03:41:51 +01:00
771e115bbd Update startup method
All checks were successful
continuous-integration/drone/push Build is passing
Small changes to improve stability and readability.
2022-11-20 03:25:51 +01:00
fddabae3c3 Make commands util class grab API instance
All checks were successful
continuous-integration/drone/push Build is passing
Instead of passing it as an argument, let the class grab the instance itself.
2022-11-20 03:18:14 +01:00
8b9ce25684 Add shutdown interrupt signal listener
This way, we can nicely close the API connection and perform general cleanup.
2022-11-20 03:17:37 +01:00
b43b882cab Add coinflip slash command
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-20 03:07:43 +01:00
fb69dcd863 Implement basic slash commands support
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-20 03:01:46 +01:00
add9dc0632 Update a comment
All checks were successful
continuous-integration/drone/push Build is passing
2022-08-26 20:57:23 +02:00
8b2fee6aec Optimize args extraction
All checks were successful
continuous-integration/drone/push Build is passing
2022-08-26 20:43:49 +02:00
ff4ffba45d Implement verbosity-changer command at runtime
All checks were successful
continuous-integration/drone/push Build is passing
2022-08-26 20:43:12 +02:00
d085a671c5 Update pause message
All checks were successful
continuous-integration/drone/push Build is passing
2022-08-26 20:29:29 +02:00
3cf8a1c92a Lower invite-link logging delay 2022-08-26 20:29:10 +02:00
a18b34b784 Add pause command to halt processing
All checks were successful
continuous-integration/drone/push Build is passing
Useful for now since I have two instances of the bot running in the same servers and I don't want both of them to respond.
2022-08-26 20:27:46 +02:00