Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emote Boards: Starboard Re-implementation, Minor Fixes #850

Merged
merged 28 commits into from
Oct 20, 2023

Conversation

jkriste
Copy link
Sponsor Member

@jkriste jkriste commented Jun 4, 2023

🪧 Emote Boards

This PR adds a new feature in replacement of starboard. Emote boards are the generic version of starboard:

  1. An emote board is added and given a channel for ClemBot to repost messages to.
  2. Given enough reactions on a message, the message will be reposted.

In addition to features present in starboard, emote boards also support:

  • Multiple emote boards per server.
  • Unicode and custom emojis.
  • The ability for ClemBot to repost content to multiple channels per emote board.
  • A leaderboard with multiple categories for general and specific emote boards.
  • Message persistence and automatic management of reposted content (for up to 30 days).
  • Per-Emote Board configuration/customization.

Resolves #821.
Resolves #782.
Resolves #645.
Resolves #635.
Resolves #331.
Resolves #234.

⚙️ Commands

NOTE: When a emoteboard parameter is present, this refers to either the board's name or the board's emote.

  • Signature: emoteboard [emoteboard]
  • Use: Displays all emote boards in the server or the info for a given emote board.
  • Aliases: board, boards, eb, emojiboard
  • Example: boards, board :star:, board starboard

Add

  • Signature: emoteboard add <emote> <name> <channel>
  • Use: Creates an emote board and attaches it to the given channel.
  • Required Claims: manage_emote_boards
  • Aliases: create
  • Example: emoteboard add :star: starboard #starboard, emoteboard add :a_custom_emote: myboard #my-board

Remove

  • Signature: emoteboard remove <emoteboard>
  • Use: Deletes the emote board from the server.
  • Required Claims: manage_emote_boards
  • Aliases: delete
  • Example: emoteboard remove :star:, emoteboard remove starboard

Leaderboard

  • Signature: emoteboard leaderboard [emoteboard]
  • Use: Displays the leaderboard for ALL emote boards in the server or for the given emote board.
  • Aliases: top
  • Example: emoteboard leaderboard :star:, emoteboard leaderboard, emoteboard leaderboard starboard

Here are the current leaderboard categories that are implemented:

  • Users ordered by total reactions received.
  • Users ordered by number of posts.
  • Posts ordered by highest number of reactions received on one post.

Set Threshold

  • Signature: emoteboard set threshold <emoteboard> <threshold>
  • Use: Sets the reaction threshold (the number of reactions in order to post) for the given emote board.
  • Required Claims: manage_emote_boards
  • Aliases: limit, reactions, emotes
  • Example: emoteboard set threshold :star: 4, emoteboard edit threshold starboard 4

Set Bots

  • Signature: emoteboard set bots <emoteboard> <allow bot posts>
  • Use: Sets whether bot messages can be reposted to this given emote board.
  • Required Claims: manage_emote_boards
  • Aliases: bot, allow_bots, bot_posts
  • Example: emoteboard set bots :star: true, emoteboard set allow_bots starboard false

Set Emote

  • Signature: emoteboard set emote <board name> <emote>
  • Use: Sets the emote for the given board.
  • Required Claims: manage_emote_boards
  • Aliases: emoji
  • Example: emoteboard set emote starboard :star:, emoteboard set emoji starboard :a_custom_emote:

Channel Add

  • Signature: emoteboard channel add <emoteboard> <channel>
  • Use: Adds a channel to the given emote board.
  • Required Claims: manage_emote_boards
  • Example: emoteboard channel add :star: #my-channel, emoteboard channel add starboard #starboard

Channel Remove

  • Signature: emoteboard channel remove <emoteboard> <channel>
  • Use: Removes the given channel from the given emote board, if present.
  • Required Claims: manage_emote_boards
  • Aliases: delete
  • Example: emoteboard channel remove :star: #my-channel, emoteboard channel delete starboard #starboard

ℹ️ Other

  • CONTRIBUTING.md and README.md have been improved by:
    • Reformatting (along with)
    • Minor visual improvements
    • Better hyperlinks
    • Grammar fixes
  • Removed left behind/unused gifMe token from BotSecrets.
  • on_raw_reaction_add has been implemented in clem_bot.py
  • The library emoji was added to support unicode-based emojis (and for verification that we're given an actual emoji).
  • Dependencies have been updated.

✅ To-Do

  • Finish API-side of feature.
  • Finish bot-side of feature.
  • Talk with J on the best way to do leaderboards.
  • Finish documentation of feature.
  • Replace Starboard mention in README.
  • Test
  • Beg J and Milo to review the PR

@jkriste jkriste self-assigned this Jun 4, 2023
@jkriste jkriste added documentation Improvements or additions to documentation enhancement New feature or request Large Feature This feature is indepth and will require changes in multiple places dependencies Pull requests that update a dependency file labels Jun 4, 2023
@github-actions
Copy link

Black linting failed: Please run poetry run black bot from the ClemBot.Bot folder

@github-actions
Copy link

Static type linting failed: Please see CI error output for details and fix the PRs typing

@github-actions
Copy link

Black linting failed: Please run poetry run black bot from the ClemBot.Bot folder

@github-actions
Copy link

Static type linting failed: Please see CI error output for details and fix the PRs typing

@github-actions
Copy link

github-actions bot commented Jul 5, 2023

Static type linting failed: Please see CI error output for details and fix the PRs typing

@github-actions
Copy link

isort linting failed: Please run poetry run isort . from the ClemBot.Bot folder

@github-actions
Copy link

Black linting failed: Please run poetry run black bot from the ClemBot.Bot folder

@jkriste jkriste marked this pull request as ready for review July 23, 2023 08:28
@jkriste
Copy link
Sponsor Member Author

jkriste commented Jul 23, 2023

@Jay-Madden bug has been fixed and is now ready for review 👍🏻

@github-actions
Copy link

Static type linting failed: Please see CI error output for details and fix the PRs typing

@github-actions
Copy link

Static type linting failed: Please see CI error output for details and fix the PRs typing

@Jay-Madden
Copy link
Member

Hmm, this doesnt appear to handle super reactions. how do we want to deal with that?

Copy link
Member

@Jay-Madden Jay-Madden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fantastic excellent PR overall, some general comments and nitpicks.

i dont think we need to channel add subcommand? or the board name? not fully following the use for that

ClemBot.Bot/bot/clem_bot.py Outdated Show resolved Hide resolved
ClemBot.Bot/bot/bot_secrets.py Show resolved Hide resolved
ClemBot.Api/.editorconfig Outdated Show resolved Hide resolved
ClemBot.Bot/bot/services/emote_board_service.py Outdated Show resolved Hide resolved
ClemBot.Bot/bot/api/emote_board_route.py Outdated Show resolved Hide resolved
ClemBot.Bot/bot/services/emote_board_service.py Outdated Show resolved Hide resolved
ClemBot.Bot/bot/services/emote_board_service.py Outdated Show resolved Hide resolved
ClemBot.Bot/bot/cogs/emote_board_cog.py Show resolved Hide resolved
ClemBot.Bot/bot/utils/converters.py Outdated Show resolved Hide resolved
@Jay-Madden Jay-Madden closed this Aug 6, 2023
@Jay-Madden Jay-Madden reopened this Aug 6, 2023
@Jay-Madden
Copy link
Member

Closed and reopened to trigger docs preview build

@Jay-Madden
Copy link
Member

Also, we should add this functionality to the readme

@netlify
Copy link

netlify bot commented Aug 6, 2023

Deploy Preview for clembotdocs failed.

Name Link
🔨 Latest commit 6063ca9
🔍 Latest deploy log https://app.netlify.com/sites/clembotdocs/deploys/64d3161f3baa03000886c6d7

@github-actions
Copy link

github-actions bot commented Aug 7, 2023

Static type linting failed: Please see CI error output for details and fix the PRs typing

@jkriste jkriste requested a review from Jay-Madden August 9, 2023 04:42
Copy link
Member

@Jay-Madden Jay-Madden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yolo

@Jay-Madden Jay-Madden merged commit 9d0c6df into ClemBotProject:master Oct 20, 2023
2 checks passed
@jkriste jkriste deleted the starboardTLC branch October 23, 2023 16:03
Jay-Madden pushed a commit to Jay-Madden/ClemBot that referenced this pull request Jan 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation enhancement New feature or request Large Feature This feature is indepth and will require changes in multiple places
Projects
None yet
3 participants