Functionality
Send a message in a channel and ensure it is always at the bottom of the chat. This can be achieved by monitoring the MESSAGE_CREATE event for new messages from users (not bots), deleting the previously-sent 'sticky message', and re-sending it.
Store the most recently-sent message in the database so the bot is able to delete it upon a restart/unexpected crash.
Config Schema
sticky_messages:
- channel_id: "CHANNEL_ID"
message: ...
sticky_messages.[].channel_id - ID of the channel where the message will be sent
sticky_messages.[].message - The message to be sent
Database Model
CREATE TABLE sticky_messages
(
message_id TEXT PRIMARY KEY NOT NULL,
channel_id TEXT NOT NULL,
);
message_id - ID of the most recently sent sticky message
channel_id - ID of the channel where the message was sent
Functionality
Send a message in a channel and ensure it is always at the bottom of the chat. This can be achieved by monitoring the
MESSAGE_CREATEevent for new messages from users (not bots), deleting the previously-sent 'sticky message', and re-sending it.Store the most recently-sent message in the database so the bot is able to delete it upon a restart/unexpected crash.
Config Schema
sticky_messages.[].channel_id- ID of the channel where the message will be sentsticky_messages.[].message- The message to be sentDatabase Model
message_id- ID of the most recently sent sticky messagechannel_id- ID of the channel where the message was sent