Code Monkey home page Code Monkey logo

moobot's Introduction

He/Him

I am a British programmer who likes to play games, watch Doctor Who or Anime, and code stuff. Additionally, I am also part of the Staff/Moderation Team behind Twitch Streamer Dr1fterX's Twitch Chat and Discord Server - and a Bug Hunter for Discord in their Discord Testers Program.

I used to mainly focus in the language of JavaScript/NodeJS, and have made a few Discord Server/User Apps using Discord.JS. Such Apps include my own EclipseMentions, Crimson Levels, HomeCord, UserStars, HeccBot (formally "MooBot"/"Actions Bot"), and other ones which are private. I've also helped Dr1fterX on his own Server Apps (dubbed "St1gBots") for his Discord Server.


My License for ALL of my Projects can be found here - please do be aware that it FORBIDS ANY use of ANY of my Projects in ANY AI/LLM projects.


My Links:

moobot's People

Contributors

dependabot[bot] avatar twilightzebby avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

moobot's Issues

[IDEA]: Config Commands

Description of Suggestion

Add a couple of commands for configuring certain behaviours of the Bot - either for the whole Server or just for the specific User.

/config

Configurable settings that affects certain behaviours for the whole Server

Warning
Requires the "Manage Server" Permission by default to see & use this Command.

Command Options:

  • info-hidden (Boolean - default false)

Sets if the responses for /info server, /info user, and /info bot are shown globally or privately

  • action-button (Boolean - default true)

Sets if the "Reaction Action" Button should be shown in Action Command responses


/prefs

Settings that only affects the User of the Command

Initial Select Options:

  • Receive Action Commands

Set if you are willing to be the target of Action Commands

  • Action Button Default

Set your default for if the "Return Action" Button is shown

"Receive Action Commands" Select Options:
Options not selected are counted as "I do not want to be the target of these"

  • Bonk
  • Boop
  • Headpat
  • Hug
  • Kiss
  • Pummel
  • Slap
  • Sleep

"Action Button Default" Select Options:

  • True
  • False

Alternatives Considered

No response

Additional Context

No response

[IDEA] /kiss command

Describe/Explain the changes/additions/removals you want
*blushes*

Describe alternatives you've considered
N/A

Additional context
Also requested by Kai on Discord

[Idea]: Add `Headpat` and `Bonk` User Commands

Description of Suggestion

Explore the idea of adding two new User Context Commands - called "Headpat" and "Bonk".

These would be "shortcut" style Commands to be able to quickly use /headpat and /bonk on a User in chat. These User Commands will NOT display a GIF nor Return Action Button.

Alternatives Considered

No response

Additional Context

No response

[PLAN] App Command Default Permissions

Now that Discord has fully released Application Commands Permissions v2, here is my plans for what default command permissions I will have for MooBot's Commands, in addition to if they will be usable in DMs or not.

Command Name Command Type Default Permission Requirement Usable in DMs?
boop Slash - FALSE
bonk Slash - FALSE
headpat Slash - FALSE
hug Slash - FALSE
info Slash - TRUE*
kiss Slash - FALSE
potato Slash CREATE_PUBLIC_THREADS** FALSE
pummel Slash - FALSE
rolemenu Slash MANAGE_ROLES FALSE
rule*** Slash - N/A
slap Slash - FALSE
sleep Slash - FALSE
start Slash START_EMBEDDED_ACTIVITIES FALSE
temperature Slash - TRUE
Convert Temperature Message - FALSE

* While /info will be usable in DMs with the Bot, it's /info server subcommand will instead bring up an error due to expecting to be used within a Server. This error will be an intended change.

** The /potato Command will require the CREATE_PUBLIC_THREADS Permission in preparation for a planned update to said Command.

*** The /rule Command will not be a Global Command, instead only be registered and usable within Dr1fterX's Discord Server. Furthermore, due to being a Guild Command, it will not have the ability to set a dm_permission flag, as described on Discord's API Documentation

[IDEA]: Expand Role Menu System with new Menu types

Description of Suggestion

The existing Role Menu system will be kept as a new MULTIPLE_CHOICE type, alongside a second new SINGLE_CHOICE type.

  • TOGGLE (Default)
    • Allows User to grant themselves one or multiple of the Roles on the Menu.
    • Example use case: Notification Roles, Game Roles, etc.
    • Description: "Users can have multiple Roles from this Menu"
  • SWAPPABLE
    • User is only able to have at MOST any one Role from the Menu. Attempting to grant another will swap Roles instead of granting both.
    • Example use case: Colour Roles, etc.
    • Description: "Users can only have 1 Role from this Menu. Roles swap if another is selected."
  • ONE_TIME_USE
    • User is only able to select ONE Role from the Menu. They cannot swap or unselect the Role afterwards.
    • Example use case: Event Team Roles, etc.
    • Description: "Users can only use this Menu once. Cannot swap or unselect Roles afterwards."

Alternatives Considered

Instead of using Buttons for the SWAPPABLE/ONE_TIME_USE types, a Select could be used instead (with a max choice count of 1).

Additional Context

No response

[BUG] Role Menu System - Bot randomly rejects valid hex colour codes for Embed colour

Describe the bug
When setting the Embed's colour, the Bot will frequently, but randomly, reject the given hex colour code, even though it is valid.

To Reproduce
Steps to reproduce the behavior:

  1. Use /rolemenu create (or /rolemenu configure on an existing Menu)
  2. Choose to configure the Embed
  3. Grab a valid hex colour code (I was using Google's colour picker, that displays when searching "hex colour picker")
  4. Set the Embed colour to the chosen colour, then submit
  5. If you are lucky, it will correctly set the Embed colour. If that is the case, keep trying until you get the error.

Expected behavior
Embed colour is correctly set, without errors, every time a valid hex colour code is given

Screenshots
N/A

Additional context
Usually wouldn't do bug reports for things that happen randomly, but this is frequent and annoying enough to warrant looking into.

[IDEA] Custom Message Support

Describe/Explain the changes/additions/removals you want
Add an optional reason: STRING argument for all action commands, excluding /start

Describe alternatives you've considered
N/A

Additional context
If given, this reason: argument would NOT use the built-in messages, and instead use the following template: "{receiver} was {action}ed by {author} {reason}", where {reason} would be replaced with what was inputted into the reason: argument.

Also, blame Nova on Discord for making me add this :c

screenshot

[ToDo]: Automate formatting of Guild Feature Flags

Description of Suggestion

Instead of manually updating a list of Key-Value pairs, instead automate transforming the raw Guild Feature Flags from their SCREAMING_SNAKE_CASE to a standard sentence casing.

Affects /info server and /info invite Commands.

Alternatives Considered

No response

Additional Context

No response

[IDEA] /cookie Command

Describe/Explain the changes/additions/removals you want
For when you just want to give a cookie to someone

Describe alternatives you've considered
N/A

Additional context

  • Example Message: "Steve gave a cookie to Alex"
  • Example Message when [at]Role: "Steve brought cookies for all those with the {role} Role!"
  • Example Message when [at]everyone: "Steve brought cookies for EVERYONE!!!"

[IDEA]: Warning for when `ADMINISTRATOR` Permission has been granted for the Bot

Description of Suggestion

The Bot should check (via Events such as Role Updates) if it was given the ADMINISTRATOR Permission in the Server. If it has, then it should output a warning saying that it is recommended not to give the ADMINISTRATOR Permission to Bots, and advise removing it from the Bot.

Where the Message is sent will be dependant on where the Bot has Permissions to send the Message. It will check in the following order and send the Message to the first place it has Permissions for:

  • If Server is Community-enabled:
    • Community Updates Channel
    • System Messages Channel (if set, if not, skip)
    • The Channel with the lowest UI Position (so highest value)
    • The Channel with the highest UI Position (so lowest value)
  • If Server is NOT Community-enabled:
    • System Messages Channel (if set, if not, skip)
    • The Channel with the lowest UI Position (so highest value)
    • The Channel with the highest UI Position (so lowest value)

If none of these checks pass, then the warning will not be sent (simply because I do not want to invade DMs with random unexpected messages).

Alternatives Considered

No response

Additional Context

No response

[PLAN] Remove `/help`

Describe/Explain the changes/additions/removals you want
Remove /help Slash Command. It was a rush job and only half done anyways.

Describe alternatives you've considered
N/A

Additional context
N/A

[IDEA]: Expand `/info` to show Role and Channel information

Description of Suggestion

/info role @role could be added to show information about the specified Role in that Server. It could include the following Role information:

  • Role's ID, name, display colour, if hoisted, icon (if set), if mentionable by everyone, if its a Bot Role, if its an Integration Role, if its the Server Boost Role

/info channel #channel could also be added to show information about the specified Channel (or the one the Command was used in) - such information could include:

  • For all Channel Types:
    • Channel's ID, name, type, its parent Channel (if has one), date/time created
  • Text Channels:
    • Number of pinned messages, latest pinned message, nsfw-status, topic, number of Threads (Active, Archived, Total), slowmode
  • Voice Channels:
    • Bitrate, nsfw-status, User limit, set video quality mode, set RTC region, slowmode
  • Category Channels:
    • Number of child Channels
  • Announcement/News Channels:
    • Number of pinned messages, latest pinned message, nsfw-status, number of Threads (Active, Archived, Total), topic, slowmode
  • Stage Channels:
    • Bitrate, RTC region, topic, current Stage instance (if one), User limit
  • Thread Channels:
    • Thread type, archived status, Invitable (if Private Thread), number of pinned messages, latest pinned message, locked status, Thread creator, Thread parent Channel (#channel mention), slowmode
    • (IF A FORUM POST THREAD) Tags, pinned status
  • Forum Channels:
    • Number of Tags, Default Reaction Emoji, Default Sort Order, Topic, Post creation slowmode, Message slowmode

Alternatives Considered

No response

Additional Context

No response

[REQUEST] /muda command

Describe/Explain the changes/additions/removals you want
For when a single /bonk just isn't enough. Requested by RoboMeister on Discord.

Describe alternatives you've considered
Possible alt. name: /ora

Additional context
See that JoJo anime, Part 3 I think the "muda"s were from.

[ToDo]: Add Support for GroupDM Usage

Description of Suggestion

To prepare for the upcoming Discord update, which will allow Bots/Apps to be usable in Group DMs (well, only the application.commands Scope, not the bot Scope).

The table below will outline the planned status for which Commands will support use in GroupDMs, DMs, and Servers.

Type Command Server DM Group DM
Slash /bonk
Slash /boop
Slash /dstatus
Slash /headpat
Slash /hug
Slash /info user
Slash /info server
Slash /info invite
Slash /info bot
Slash /info role (Upcoming)
Slash /kiss
Slash /lockemoji
Slash /rolemenu
Slash /rule
Slash /temperature
Message Convert Temperature
Message Edit Role Menu
Message Delete Role Menu

Alternatives Considered

No response

Additional Context

No response

[IDEA]: Hypixel Informational Commands

Description of Suggestion

This Bot originated as a private replacement for the Kawaii Bot when Kawaii shut down, and now this suggestion will fill in where the long-shut down Hypixel Bot used to be!

Add a bunch of Subcommands under a hypixel Subcommand Group (which itself will be under the main /info Command). Example: /info hypixel player, /info hypixel game, etc.

Possible Subcommands:

  • /info hypixel player [STRING:username]

Shows basic Hypixel information about the specified Player. If the Player is currently online, also shows the minigame they're currently playing.

  • /info hypixel game [AUTOCOMPLETE_STRING:name]

Shows basic Hypixel information about the specified Game

  • /info hypixel guild [STRING:name]

Shows basic information about the specified Guild on Hypixel

  • /info hypixel skyblock [STRING:username]

Shows basic Skyblock information for the specified Player on Hypixel

Alternatives Considered

No response

Additional Context

No response

[IDEA] Group recent Slash Command Responses

Describe/Explain the changes/additions/removals you want
When multiple Users use a Slash Command within the same timeframe (maybe 60 seconds), it groups all the responses into the same message as the first of the group.

Describe alternatives you've considered
N/A

Additional context
Screenshot shows how it could look:
screenshot

[IDEA] Localised Slash Command Names, Descriptions, etc

Describe/Explain the changes/additions/removals you want
Localise the names & descriptions of all the Slash Commands, and their options too.

Describe alternatives you've considered
N/A

Additional context
Need to wait for Discord to formally announce when this is publicly possible, and later, for D.JS to add support for this.

This is now fully released by Discord, and DJS already supports it in v14

[IDEA] /poke Command

Describe/Explain the changes/additions/removals you want
Poke/Boop someone

Describe alternatives you've considered
N/A

Additional context

  • Example Response: "Steve poked Alex"
  • Example when [at]Role: "Steve poked all those with the {role} Role!"
  • Example when [at]everyone: "Steve's poking everyone!"

[REQUEST] Poll System

Describe/Explain the changes/additions/removals you want
Requested by Dr1fterX after I made my basic rushed Poll system for my Halloween Movie Night.

Would add a /poll command that allows for creation of polls that peeps can then vote on.

Additional context

  • Poll will support use of either Selects or Buttons for answers, but not both
  • Will use new Models for Poll Creation (when Models are released)
  • Polls will last a maximum of 14 days (2 weeks)
  • Buttons Polls have a maximum possible answer choice of 5; while Select Polls have a maximum of 25

[IDEA] Auto-poster of Discord Outages

Describe/Explain the changes/additions/removals you want
Whenever a Discord outage happens (as posted on discordstatus.com, their official status page), auto-post it in #social on Dr1fterX's Discord. Furthermore, any updates to an ongoing outage should be reflected by editing previously sent outage notices.

Describe alternatives you've considered
N/A

Additional context
N/A

[IDEA] Twitch/YouTube Notifier Module

Describe/Explain the changes/additions/removals you want
As part of my wanting to replace the nasty Mee6, make my own module that posts whenever a specified Twitch Channel goes live, and when a specified YouTube Channel posts a new video or goes live.

Describe alternatives you've considered
Use another, pre-existing Bot other than Mee6

Additional context
N/A

  • Twitch Notifier (when defined Channel goes live)
  • YouTube Notifier
    • When Channel uploads a new, public, video (not private or unlisted)
    • When Channel goes live
  • If Channel is live (on either platform), grant "is live" Role if configured (and remove when channel isn't live any more)

[PLAN] Replace `a!say` with a new `/say` Command

Now that Input Modals have released, it's time to replace the basic, placeholder a!say Text Command with a better /say Slash Command.
It will make full use of Input Modals (for grabbing message/embed content), Buttons (for deciding if I just want a plain Message or an Embed), and Ephemeral Messages.

This command is still only usable by myself, TwilightZebby. As of Discord's App Permissions v2, it is no longer possible to restrict Slash Commands to a single User on Command creation or using the Command Permission Endpoints (which are now limited to an OAuth Scope Permission). As a result, it is currently unknown how best to go about this.

Currently thought of options are:

  • Remove a!say Command and not add /say (in other words, scrapping this Command completely)
  • Remove a!say Command, add /say, but also allow Server Owners/Admins to be able to use this Command too
  • Scrap the plans for /say, and keep a!say

[BUG] Role Menu System - Unclear error when missing `SEND_MESSAGES` Permission

Describe the bug
Upon creation of a new Role Menu, if the Bot doesn't have the SEND_MESSAGES Permission for the current Channel, it will throw a generic (and unhelpful) error.

To Reproduce
Steps to reproduce the behavior:

  1. Run /rolemenu create in a Text Channel where the Bot does not have SEND_MESSAGES Permission
  2. Configure Embed & add at least one (1) Role
  3. Select the "Save & Display" option
  4. See error

Expected behavior
The error states that the Bot is missing the SEND_MESSAGES Permission, instead of leaving the User to be confused as to why their Role Menu won't save & display.

Additional context
N/A

[BUG] "Return to Sender" Action Buttons delete message instead of just the button

Describe the bug
Upon pressing the "Return X" Buttons (which are attached to the Action Slash Command responses), the whole message is deleted

To Reproduce
Steps to reproduce the behavior:

  1. Trigger one of the Action Slash Commands (such as /boop) with a non-Bot Member as the target, no GIFs
  2. After response is sent, have the target click the button
  3. Observe

Expected behavior
The Button is removed, and a secondary response is sent

[IDEA] Auto-Quote from Message Link

Describe/Explain the changes/additions/removals you want
Inspired by Fire Bot's auto-quote system, will detect when a Discord Message link was pasted into chat and, if the source message is from the same server, quotes that message in an Embed.

[Bug]: ROLE MENU - Bot rejects valid Unicode Emojis every second attempt

Description of Bug

On every second Role Addition or Button Edit attempt, when including a valid Unicode Emoji, the Bot will reject it. Trying the exact same input again after the rejection has it work though.

Reproduction Steps

  1. Use /rolemenu create
  2. Select "Edit Embed and edit the Embed
  3. Select "Add Role"
  4. Give a valid Role ID, and a Unicode Emoji
  5. Note that it works
  6. Give a second valid Role ID, and include a Unicode Emoji
  7. Note that the Bot rejects it
  8. Repeat Step 6 with the exact same Role ID and Unicode Emoji
  9. Note the Bot accepts it this time

Expected Behaviour

Bot should accept valid Unicode Emojis on every attempt, not reject on every second attempt.

Additional Context

No response

[BUG] `/pummel` doesn't function at all

Describe the bug
Attempting to use /pummel results in the "Something went wrong" error message appearing instead of the expected response. Every time.

To Reproduce
Steps to reproduce the behavior:

  1. Trigger the /pummel Slash Command in a Channel you have USE_APPLICATION_COMMANDS Permission in
  2. Observe

Expected behavior
The Bot responds with the "X was pummeled by Y" message

Different responses depending on User Input

Describe/Explain the changes/additions/removals you want
Responses to change dependant on the User's Input - that is, [at]User, [at]Role, [at]Everyone, and plain-text.

Describe alternatives you've considered
N/A

Additional context
Store the different response message types in their own JSON files. So [at]User & plain-text has userMessages.json, [at]Role has roleMessages.json, and [at]Everyone has everyoneMessages.json

Furthermore, there should be an extra type (selfMessages.json) for when the Author inputs an [at]User mention of themselves or their own Username/Nickname.

[IDEA]: Command to add a Role-locked Emoji

Description of Suggestion

Could add a Command that allows Server Owners/Admins to upload custom Emojis, that are Role-locked.
Meaning, Users would need to have that Role in order to see/use that Emoji - even prevents Server Owners from using the Emoji without the Role!

Possible Slash Command Syntax:

  • /lockemoji emoji role
  • Where emoji is an Attachment Option, and role is a Role Option

Alternatives Considered

No response

Additional Context

No response

[IDEA] Information Command

Describe/Explain the changes/additions/removals you want
Add a /info Slash Command, with the following Sub Commands:

  • /info bot - gives information about this Bot, such as Developer, D.JS Version, Bot's Version, Privacy Policy, etc
  • /info user @user - Fetches and displays information about that User; such as Username#Discrim, User Flags (known ones), Account age, etc
  • /info server - Fetches and displays information about the Server command was used in; such as Server name, Server owner, Server's Feature flags, etc.
  • /info invite code - Fetches and displays information about the given Server Invite Link, if it exists on Discord.

Describe alternatives you've considered
N/A

Additional context
Would rather wait until Discord sorts out the Slash Command UI and allow collapsing Slash Commands before working on this :)

[IDEA] `/temperature` Slash Command

Describe/Explain the changes/additions/removals you want
A Slash Command version of the Convert Temperature Message Command.
This one is more for those times when you want to convert a Temperature that wasn't given in a format supported by the Message Command version.
Also aids for Mobile Users, since Mobile Discord doesn't support Context Commands yet :c

Describe alternatives you've considered
N/A

Additional context
N/A

[IDEA] /sleep Command

Describe/Explain the changes/additions/removals you want
A Command that tells the given person to GO TO SLEEP!

Describe alternatives you've considered
N/A

Additional context

  • Example message: "Steve wants Alex to go to sleep!"
  • Example when [at]Role: "Steve wants all those with the {role} Role to go to sleep!"
  • Example when [at]Everyone: "Steve cares for everyone and wants you all to go to sleep!"

[IDEA] Button Role System

Describe/Explain the changes/additions/removals you want
Replace the current self-assignable role system on Dr1fterX's Server (which currently is Reaction-based) with an improved system that uses Buttons for toggling Roles for oneself.

Additional context

  • /rolemenu Slash Command, only usable by those with the MANAGE_ROLES Permission. Will have the following sub-commands:
    • /rolemenu create - starts the process of creating a new Message w/ Buttons for Self-Assignable Roles
    • /rolemenu edit <messageid : STRING> - Starts the process of editing an editing Button-Role Message, allowing for adding new Roles, removing previous ones, or changing the emoji/name of a button
    • These processes will use Ephemeral Messages and Input Forms (when released) so that the channel doesn't have to be hidden in order to prevent unread marker spam

[IDEA] Localised Responses for Ephemeral Messages

Describe/Explain the changes/additions/removals you want
Since Discord now provides the User's Locale in Interactions (Slash Commands, etc), give the User a localised response when responding in an Ephemeral Message.

Describe alternatives you've considered
N/A

Additional context
N/A

[IDEA] /boop command

Describe/Explain the changes/additions/removals you want
A command to boop peeps. BOOP

Describe alternatives you've considered
Maybe /poke ala #2

Additional context
N/A

[IDEA]: Expand Customisation of Role Buttons in Role Menus

Description of Suggestion

Note
This depends on Discord releasing support for Selects in Modals, as such, won't be added to the Bot until that comes to fruition :)

When adding or editing a Role's Button, there could be a new Select Input in the Modal for changing the Style of the Button, and for toggling the Button's usability (if its disabled flag is true or not).

This will mean, should this be added, the Modals for Role Button Creation/Editing will look like this:

  • Role ID (if creating) - Text Input (Will switch to Role Select when that Select Type is released)
  • Button Label - Text Input
  • Button Emoji - Text Input
  • Button Style - Select
  • Disabled? (if editing) - Select (between True/False)

Alternatives Considered

No response

Additional Context

No response

[REQUEST] /slap Command

Describe/Explain the changes/additions/removals you want
Slap peeps

Describe alternatives you've considered
N/A

Additional context
Requested by Nachoz on Discord

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.