Commit graph

686 commits

Author SHA1 Message Date
af14c7598e fix: throw error if user tries to execute same command while one is processing
If a user tries to execute same command twice at same time, then throw error on one of them to prevent them from go around the cooldown system
2023-06-02 12:55:31 +02:00
acdd5076e7 feat: 🚸 improve style for users on interaction error
Moved error message into description and if its undefined then show a general error
2023-06-02 12:55:31 +02:00
828524d4c2 fix: 🐛 fix reputation repute function
Fixed the broken reputation repute command, so now it actualyl can give reputation to people
2023-06-02 12:55:31 +02:00
26d03c282c feat: 🚸 make bonus commands set their time at midnights
This fixes all bonus commands to have their cooldowns set at midnight
2023-06-02 12:55:31 +02:00
e223309796 feat: ability to set prorata cooldowns
This should solve issues where some commands wants prorata cooldowns, that expire on midnight and such

Ability to set a cooldown using seconds, now you need to call a Date constructing function. So you always pass a date as cooldownTime
2023-06-02 12:55:31 +02:00
add510e6d0 style: 🧑‍💻 change to 24*60*60 instead of 86400 2023-06-02 12:55:31 +02:00
Elis Odenhage
9cbe7cafcf fix: update cooldown duration to a week 2023-05-31 21:55:44 +02:00
Elis Odenhage
79076a49fc fix: update cooldown duration to a month 2023-05-31 21:55:44 +02:00
8c1c0af360 feat: 🚸 add penalty cost if spamming messages
If a user sends messages too fast, it will give them a penalty defined by "penaltyAmount" so that users will lose credits by spamming. Spam rate is set by "maxMessageAmount" which is how many messages a user is allowed to send during "checkTime"
2023-05-31 14:51:07 +02:00
3875c9e136 fix: 🗃️ update instead of create new cooldowns if one already exists
This should solve problems related to bot creating new cooldowns when they are expired instead of updating their "expiresAt" date
2023-05-31 14:51:07 +02:00
450d8304b2 fix: 🐛 remove expiresAt when searching cooldown table
This was a "bug" that made Prisma  create new cooldowns whenever it exceeded the expiresAt Datetime
2023-05-30 10:14:56 +02:00
2c8acb380e fix: fix duplicate rows
The bot created new cooldowns instead of updating old ones, this commit fixes this by doing an updateMany if it finds a cooldown instead of just creating new ones
2023-05-29 21:08:38 +02:00
5a43128c50 fix: replace template string with double quote
Replaced with double quote as a template string is unneeded
2023-05-29 17:31:17 +02:00
04ef7c9d8d fix: 🐛 create user if not exist before create quote
Create missing users before creating a new quote in database to ensure that it can have a relation
2023-05-29 17:31:17 +02:00
ce7d3d8695 fix: 🚚 rename quote to quotes
Renamed /quote to /quotes
2023-05-29 17:31:17 +02:00
a2e1fa7a98 feat: add quote feature
Now users can post quotes about each other if guild has enabled it!
2023-05-29 17:31:17 +02:00
21a5cd3eab fix: 🚸 change to ephermal cooldown messages
Changed to using ephemeral messages for cooldowns, so users are not spamming others by cooldown messages
2023-05-29 17:31:17 +02:00
3cf88abfd0 feat: 🗃️ add createdAt & updatedAt fields for Cooldowns
Added timestamps for when a cooldown was created and last time updated
2023-05-29 17:31:17 +02:00
af9e48a8eb Version 2.0.0 2023-05-28 16:06:21 +02:00
bbdf359dd7 Improve discord subcommand descriptions 2023-01-26 18:43:30 +01:00
2d5182f840 Remove commented code 2023-01-26 18:43:30 +01:00
c19a1d8653 Improve structure subcommands utils 2023-01-26 18:43:30 +01:00
9eb3dacc5c Improved structure of single file events 2023-01-26 18:43:30 +01:00
672abc44bd More refactoring 2023-01-26 18:43:30 +01:00
aea3dfd365 refactoring 2023-01-26 18:43:30 +01:00
deepsource-autofix[bot]
61f7cf8c65 Format code with prettier 2023-01-21 19:09:23 +01:00
72ac9d3895 fix issue #596 2023-01-21 19:09:23 +01:00
6b1eb44fad improve user experience 2023-01-21 19:09:23 +01:00
d19a3af6a3 fix issue #588 2023-01-21 19:09:23 +01:00
2489728efb refactor: 🧑‍💻 improve developer experience 2022-12-25 21:29:33 +01:00
64f8cceb34 fix: 🐛 fix cooldown twice action
I think this has solved the problem
2022-12-25 21:29:33 +01:00
96cb38464a refactor: 🧑‍💻 improve developer experience 2022-12-25 16:53:30 +01:00
089b20a8cd fix: 🐛 fix cooldown twice action
I think this has solved the problem
2022-12-25 16:53:30 +01:00
79d67fdf85 refactor: 🚸 change bot presence 2022-12-25 03:23:54 +01:00
6f932d9fb9 fix: 🚑 fix bot crash if oldMessage content undefined
Added an if statement to return if oldMessage.content is undefined
2022-12-25 03:13:24 +01:00
79a563e849 refactor: 🚸 refactor and improve ux in heplers and middlewares 2022-12-25 02:45:53 +01:00
d35242f33a refactor: 🧑‍💻 refactored event messageCreate
Remove unnecessary code in the messageCreate event
2022-12-21 07:48:50 +01:00
b5a6385e18 refactor: 🧑‍💻 refactored interactionCreate
Improved handling of interactions, using correct types
2022-12-21 07:40:41 +01:00
3b0bde3cc5 refactor: 🚸 refactor config credits
Refactored and improved UX for /config credits
2022-12-20 09:33:19 +01:00
e6c3e6cfc4 refactor: 🧑‍💻 refactor config cpgg
Refactored and improved UX for /config cpgg
2022-12-20 09:21:59 +01:00
61eaf84dc7 refactor: 🧑‍💻 refactor config audits
Refactored and improved UX for the /config audits command
2022-12-20 09:21:59 +01:00
94dac69c00 Update overDueForPayment.ts 2022-12-19 20:44:17 +01:00
109b89c820 fix: 🗃️ Perform migrations from older versions
This is my first customized migration script, I hope it works as intended.

This may result in a database loss, please perform backups before proceeding, it should do migrate if everything works as intended
2022-12-19 20:44:17 +01:00
258e15c45d perf: 🗃️ seperate configs in database 2022-12-19 20:44:17 +01:00
c3fe4ca2d5 fix(audits): 🐛 Fix audit log sent when an url is sent that adds an embed to the message #514
Fixed so the bot wont send a messageUpdate audit log when links are sent
2022-12-19 20:44:17 +01:00
3c079943b0 refactor: 🧑‍💻 modules are called subcommands and groups
It makes more sense to use subcommands and groups as names instead of modules
2022-12-19 20:44:17 +01:00
a6605f7732 feat(audits): add content to embed
Added content to audit embeds for messageDelete and messageUpdate
2022-12-19 20:44:17 +01:00
f0121206b5 style(ux): 🚸 update audit embed
Updated audit embeds for guildMemberAdd and guildMemberRemove event
2022-12-19 20:44:17 +01:00
0a444ad771 refactor(audits): ♻️ refactor interactionCreate audit log
Refactored interactionCreate audit log file
2022-12-19 20:44:17 +01:00
ae368d8ed5 refactor(audits): ♻️ add auditLog helper
Added auditLogger function as an helper to reduce duplication of code
2022-12-19 20:44:17 +01:00