-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
002_schema.sql
CREATE TABLE IF NOT EXISTS player_count_notification_messages (
channel_id BIGINT NOT NULL PRIMARY KEY
references channels(id)
ON DELETE CASCADE,
message_id BIGINT NOT NULL
);should listen to message deletion events
in order to delete the database entry in case tue message is deleted manually.
we want a more dedicated table name due to potentially other types of notifications.
--- name: AddPlayerCountNotificationMessage :exec
INSERT INTO player_count_notification_messages (channel_id, message_id) VALUES ($1, $2)
ON CONFLICT (channel_id) SET message_id = EXCLUDED.message_id;
--- name:RemovePlayerCountNotifocationMessage :exec
REMOVE FROM player_count_notification_messages
WHERE channel_id = $1
AND message_id = $2;do we want to create a central notification message or do we want to send DMs?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels