Mode to auto kick someone that has had a role for 24 hours #485

Open
opened 2024-10-19 16:43:18 +01:00 by Vylpes · 7 comments
Owner
  • Plan
  • Plan tests
  • Implement
    • Add database entity to track roles
    • Create helper class to add, update, and remove
    • Create command to edit config
    • Create command to remove config
    • Add ability to run background tasks on a timer
    • Create timer
    • Add notice time function to the timer
    • Fix .send() crashing the bot on timer function run
  • Test
- [x] Plan - [x] Plan tests - [ ] Implement - [x] Add database entity to track roles - [x] Create helper class to add, update, and remove - [x] Create command to edit config - [x] Create command to remove config - [x] Add ability to run background tasks on a timer - [x] Create timer - [x] Add notice time function to the timer - [ ] Fix .send() crashing the bot on timer function run - [ ] Test
Vylpes added this to the 3.2.4 milestone 2024-10-19 16:43:18 +01:00
Vylpes added the
type
change
label 2024-10-19 16:43:24 +01:00
Author
Owner

Do we want a reminder notification sent a couple hours before they're due to be kicked?

Do we want a reminder notification sent a couple hours before they're due to be kicked?
Vylpes added the
question
label 2024-10-19 17:10:45 +01:00
Author
Owner

Do we want a reminder notification sent a couple hours before they're due to be kicked?

A reminder would be good

> Do we want a reminder notification sent a couple hours before they're due to be kicked? A reminder would be good
Vylpes removed the
question
label 2024-10-20 11:16:34 +01:00
Vylpes added this to the 3.3 Sprint 6 project 2024-10-29 09:58:51 +00:00
Author
Owner

Make the time configurable

Make the time configurable
Vylpes self-assigned this 2024-11-15 17:48:57 +00:00
Vylpes started working 2024-11-15 17:50:07 +00:00
Author
Owner

Command Parameters

Name Type Required Notes
Role Role Yes
KickTime String Yes The time until kick, formatted as a time span
NoticeTime String No The time before kicking when a notice is sent, formatted as a time span
NoticeChannel Channel No The channel to send the notice into

Database Entity

Name Type Nullable Notes
Id UUID No Primary Key
WhenCreated DateTime No
WhenUpdated DateTime No
ServerId String No
RoleId String No
KickTime int No The time in milliseconds to kick after gaining role, or since joining
NoticeTime int Yes The time in milliseconds to send notice before KickTime
NoticeChannelId String Yes The channel id where the notice will be sent
## Command Parameters | Name | Type | Required | Notes | | ------------- | ------- | -------- | ----------------------------------------------------------------------- | | Role | Role | Yes | | | KickTime | String | Yes | The time until kick, formatted as a time span | | NoticeTime | String | No | The time before kicking when a notice is sent, formatted as a time span | | NoticeChannel | Channel | No | The channel to send the notice into | ## Database Entity | Name | Type | Nullable | Notes | | --------------- | -------- | -------- | --------------------------------------------------------------------- | | Id | UUID | No | Primary Key | | WhenCreated | DateTime | No | | | WhenUpdated | DateTime | No | | | ServerId | String | No | | | RoleId | String | No | | | KickTime | int | No | The time in milliseconds to kick after gaining role, or since joining | | NoticeTime | int | Yes | The time in milliseconds to send notice before KickTime | | NoticeChannelId | String | Yes | The channel id where the notice will be sent |
Author
Owner

Can I in the discord api check when a user was given a role?

Can I in the discord api check when a user was given a role?
Author
Owner

Can I in the discord api check when a user was given a role?

Doesn't look like it, so will need to store this myself

> Can I in the discord api check when a user was given a role? Doesn't look like it, so will need to store this myself
Vylpes stopped working 2024-11-15 18:14:52 +00:00
24 minutes 45 seconds
Vylpes started working 2024-11-23 17:48:46 +00:00
Author
Owner
No description provided.
Vylpes stopped working 2024-11-23 17:59:33 +00:00
10 minutes 47 seconds
Vylpes started working 2024-11-30 13:14:35 +00:00
Vylpes stopped working 2024-11-30 13:53:49 +00:00
39 minutes 14 seconds
Vylpes started working 2024-12-06 20:14:35 +00:00
Vylpes stopped working 2024-12-06 20:55:04 +00:00
40 minutes 29 seconds
Vylpes modified the project from 3.3 Sprint 6 to 3.3 Sprint 7 2024-12-08 16:39:24 +00:00
Vylpes started working 2024-12-16 18:33:55 +00:00
Vylpes stopped working 2024-12-16 19:00:02 +00:00
26 minutes 7 seconds
Vylpes added spent time 2024-12-21 14:27:06 +00:00
5 minutes
Vylpes added spent time 2024-12-21 14:27:14 +00:00
20 minutes
Vylpes started working 2024-12-22 17:51:11 +00:00
Vylpes stopped working 2024-12-22 18:16:59 +00:00
25 minutes 48 seconds
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Total time spent: 3 hours 12 minutes
Vylpes
3 hours 12 minutes
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: RabbitLabs/vylbot-app#485
No description provided.