Skip to content
This repository has been archived by the owner on Dec 4, 2018. It is now read-only.

Pin system outline #5

Open
LikeLakers2 opened this issue Jan 25, 2017 · 0 comments
Open

Pin system outline #5

LikeLakers2 opened this issue Jan 25, 2017 · 0 comments

Comments

@LikeLakers2
Copy link
Owner

LikeLakers2 commented Jan 25, 2017

This is the outline for an infinite pins system idea I had quite a while ago.

What is it?

This is a system that will allow for technically and potentially infinite pins in a channel, through use of a bot pinning and unpinning messages through a command, and automatically adding new pins to a database for that channel.

Who is it for?

This is for those channels and servers that may enjoy pinning funny moments, but wish to reserve pin space for the important pins, such as announcements or otherwise.

When and where might it be useful?

My primary use case for this is the /r/Undertale Discord and the roleplay channels, as I have found that some roleplays enjoy pinning funny moments or out of context messages, and quickly run out due to the continuous nature of roleplays such as the ones I participate in. However, this may just as easily be applied to any channel as to roleplay channels, so the use case is not limited to roleplay.

Why is this useful?

This will allow for technically and potentially infinite pins, as well as allow for pinning of funny moments in a channel without fear of spamming the pin section with non-announcement messages.

How might it be detrimental to the user experience?

Users, especially in channels where funny pins were previously not allowed, may start to beg to be pinned, especially on large servers, so this puts a bit more focus on moderators being on the ball.

How will it work internally?

Upon a message being pinned, the bot will analyze the data contained within the pin event, primarily the ID of the message being pinned, and will store this data within a database for that channel. 30 to 60 seconds after a message is pinned, the bot will automatically unpin the message unless instructed not to do so, such as in the case of announcements -- the purpose of this wait is to allow the users with context at the time to see the pin immediately without needing to go through the bot. If the message is unpinned manually before this timer is up, the bot will remove the pin from its database, presuming it to be an accidental pin. Pins may be added to the DB immediately, without needing to pin, if a user with proper permissions sends a command for it to do so.

The bot will have a public command (let's call it ?pins for now) that will be accessible to all users. This will allow a user to view the pins database in reverse order (newest first) and request that a message be pinned temporarily (15 to 30 seconds) to allow a user to gain context. This command will also contain admin functionality, to allow admin management of the pins database for that channel.

Upon being requested to pin the message, the bot will query the channel API to load a message with that specific ID from the current channel. Upon receiving a successful message, the bot will query the channel API to pin the message, wait the timer, and then unpin it. If the message with a specific ID is not found, we will presume the message is deleted, and the bot may potentially opt to search for the closest message ID in that channel to the one requested and pin it, such that a user may still obtain context.

The pins database will be freely downloadable upon request, being simply a list of IDs which may be inserted into any bot to pin those messages.

TO BE ADDED: A flowchart so you people can look at pictures instead of paragraphs of text.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant