Giter Club home page Giter Club logo

mizuchi's Introduction

Project Mizuchi - Custom Discord bot for the Climbers Court Community

Mizuchi is built in Node.js for the Climbers Court community. It runs on the Augur framework, utilizing the Discord.js library. The name Mizuchi is based on a character from the works of Andrew Rowe. The code is owned by the climbers court community staff members.

Pull requests from the community are welcome. Speak with Behold on Discord prior to starting to ensure your features fit with the bot.

When submitting a PR, please include the following questions with the appropriate answers:

  • Are any changes to config.json necessary? If so, are they reflected in config-example.json?
  • Are all referenced snowflakes contained in the config/snowflake.json file, rather than in the code directly?
  • Are any changes to Interaction fingerprints needed? If so, are they reflected in the appropriate file in /registry?
  • Have I used JSdoc style comments (at least) to properly document all of my functions?
  • Are there any new dependencies that need to be installed? If so, are they reflected in package.json?

Some code has been re-used with permission from Kevin Dixon (Gaiwecoor).

Release Naming:

Releases will be named based on the last word in the title of books published by the author. Expected titles for releases are:

  • v1.0.0 - Magic
  • v2.0.0 - Titan
  • v3.0.0 - Star
  • v4.0.0 - Sword
  • v5.0.0 - Diamond
  • v6.0.0 - Soul
  • v7.0.0 - Divinity
  • v8.0.0 - Sorcery
  • v9.0.0 - Destiny

mizuchi's People

Contributors

chevyboys avatar gaiwecoor avatar laughlax avatar norablackcat avatar guyingrey avatar lanbysea avatar mayorsporky42 avatar griffing1 avatar king-tersael avatar

Stargazers

 avatar  avatar Devin Driggs avatar

Watchers

 avatar  avatar Kostas Georgiou avatar  avatar

mizuchi's Issues

/media-promo

Is your feature request related to a problem? Please describe.
Currently, there is no set way to promote a piece of media on the server. It is mostly an informal process of getting moderator approval. In addition, it does not go through #mod-requests, rather its just kind of discussed in staff channels

Describe the solution you'd like
There should be a few components to this:

  1. The slash command to invoke this system
  2. The mod request card and buttons to approve or deny it
  3. The embed that will be posted if approved

1. The slash command should have:
Inputs fields:

  • A title Title string (for the title of the work the person recommends
  • A link string (the bot should verify that it is a link and should probably check it against spam links or against a domain whitelist)
  • A reason string (For why the person recommends it
  • An optional image link field for an image to be added to the embed
  • An optional channel field that will allow the user to request a specific channel for the promotion embed to be sent in (which can be overridden by the moderation team.) (Defaulting to the channel the command was used in)

Response message:

  • An ephemeral response notifying people that a request has been made to the mods

Description:

  • Should include a reminder that nothing NSFW can be promoted

Other:

  • The slash command will not trigger the mod card for users that have been banned from using the command, or have used the command in the past 24 hours. (persistent across restarts)

2. The Mod card should have:

  • a warning to double check that the links are correct before approval
  • a drop down menu of channels for overriding the user's selection
  • a button for approval, denial, and banning, each showing how many votes each option has received and how many votes are needed for that option to be approved. Approval will need three staff member's approval, denial only one, and banning someone from using the command again will need two votes. None of these buttons will reset the 24 hour timer.
  • a list of which moderators have voted for each option.

3. The Embed should:

  • be sent in the channel selected either by the requester or the mods
  • Display all the info entered by the command user
  • Be editable by the moderators

Misc:

  • If this command is used by a world-maker, any approved promos be added to the results of the /rowe-recs command. See also #61

Describe alternatives you've considered
None

Additional context
This has been discussed by the moderation staff to a certain degree, but has not yet been finalized

add /ask + /transfer

Add the /ask and /transfer system

Changes:

  • Commands in separate files in their own folder

  • Ping all updates and question updates when rowe is answering questions

  • Ask becomes /question ask

  • All current commands beginning with /question- will become sub commands of /question

  • /transfer becomes /question transfer and sends an embed with the username and pfp of the asker for each question. Add quick action buttons for Worldmakers:

    • Ask again some other time
    • RAFO
    • LARPers can answer this (will replace question with a new one)
      image
  • Trash button becomes options button: (sends an ephemeral message with a dropdown menu)

    • Move to question discussion for non worldmaker answer (LARPers, Mod+, Worldmaker)
    • Delete
    • Archive
    • Force vote amount
  • Remove commands that duplicate options functionality (/question delete)

  • New cooldown is 30 minutes per question in queue, when someone asks, let them know when they can ask again.

  • Instead of question number, when buttons are updated, show the current position in the queue. Update each question at least once daily.

  • Make utility file to handle common functions

    • Archive (instead of deleting questions after they are answered, so we can unarchive them later if needed)
    • Delete (spam/duplicate questions)
    • Ask questions (multiple ways of invoking, better just to have it in a utility file)
      • make sure ask is disabled for people who have had the smite command run on them.
    • Generate buttons for question embeds
    • Get all questions (sorted by current votes)
    • Get current number of questions
    • Create question file/data structure
    • Set/check question based cooldowns
  • Store questions in data/questions/queue and data/questions/archive

Disable Larper bookmarks

Is your feature request related to a problem? Please describe.

The bookmark feature needs to be disabled on messages sent by LARPers and Worldmakers to prevent the bot assisted saving of leaked or outdated info.

Describe the solution you'd like

A check on the target message for the worldmaker or Larper roles.

Describe alternatives you've considered
Disabling bookmarks entirely, since otherwise they are technically in violation of the procedures and Precedent we have set for protecting intellectual property

Additional context
Add any other context or screenshots about the feature request here.

Add !git [pull/stash]

The bot needs to be able to manage local git commands in order to work in our current environment

Help command needs to be redone

The help command formatting is currently abysmal, and doesn't include slash commands or their descriptions. This needs to be addressed at some point

/repo command

We should add a repo command that tells people where the GitHub repo is

Ask channel messages fix

If someone sends a message in the ask channel, it should act the same as /ask. /Ask should work in any channel.

Slowmode should be handled by the bot, not the channel. When someone asks an invalid question, it should send them the question content so they can re-ask later.

add db infrastucture

Connect the bot to the database. Might be able to use existing database utils file

Ensure user information is deleted 12 months after the last time the person was a member of the server

Birthday messages in #general should be a single message per day

Birthday messages are currently a message per user who has cakeday on a given day, rather than a single message. This should be adjusted so it is a single message if the total message length of the message is below 2000 characters, and it should be split into multiple only based on length

FAQ's

Lav would like CC to have a FAQ, where it is easy to find questions, and where not all answers are always displayed because there is a lot of text in the answers. We have developed an option for it which is live for testing. Just waiting on mod approval of the UI, and on an FAQ channel to be made.

Pin requests not working.

DiscordAPIError: Invalid Form Body
embeds[0].description: This field is required
at RequestHandler.execute (/home/minecraft/multicraft/servers/server233069/node_modules/discord.js/src/rest/RequestHandler.js:350:13)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async RequestHandler.push (/home/minecraft/multicraft/servers/server233069/node_modules/discord.js/src/rest/RequestHandler.js:51:14)
at async TextChannel.send (/home/minecraft/multicraft/servers/server233069/node_modules/discord.js/src/structures/interfaces/TextBasedChannel.js:175:15)
at async modRequestCard (/home/minecraft/multicraft/servers/server233069/utils/Utils.ContextMenu.Message.ModCard.js:64:18)
at async AugurInteractionCommand.process (/home/minecraft/multicraft/servers/server233069/utils/Utils.ContextMenu.Message.ModCard.js:149:30)
at async AugurInteractionCommand.execute (/home/minecraft/multicraft/servers/server233069/node_modules/augurbot/Augur.js:682:55)
at async AugurClient.<anonymous> (/home/minecraft/multicraft/servers/server233069/node_modules/augurbot/Augur.js:503:24)
Message
Pin Card Reaction

and

TypeError: Cannot read properties of undefined (reading 'id')
at AugurInteractionCommand.process (/home/minecraft/multicraft/servers/server233069/utils/Utils.ContextMenu.Message.ModCard.js:150:114)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async AugurInteractionCommand.execute (/home/minecraft/multicraft/servers/server233069/node_modules/augurbot/Augur.js:682:55)
at async AugurClient.<anonymous> (/home/minecraft/multicraft/servers/server233069/node_modules/augurbot/Augur.js:503:24)
Message
modRequest Request Processing
Today at 4:59 PM```

Happen if a pin is requested weather or not it is done through emoji reactions. We need to test to see if this is isolated to one kind of request and isolate the issue.

Auto-ping staff in threads

Is your feature request related to a problem? Please describe.
Staff members need to be added to all relevant threads when the threads are created so they can moderate them.

Describe the solution you'd like
On thread creation, the bot should attempt to add all staff members to the thread, by pinging all staff roles.

Describe alternatives you've considered
Currently users can manually make threads, and then manually ping staff members, but this is tedious and often forgotten

Additional context
This has been brought up with the server staff and is awaiting approval

/cakeday commands

Mee6 is no longer ideal for handling our cakedays. In order to handle it in this bot, we will first need to deploy a database

Get Cakeday feedback from users

People aren't quite satisfied with cakedays right now.
We need to get feedback from them, and then create new issues for what want adjusted

add /cakeday system:

  • create cakeday utility file

    • create get today's of cakedays.
    • ensure smited users are excluded.
    • Ensure users who have opted out are excluded
  • create opt in function

    • prompt users to confirm that they are at least 16 years old, or have parental consent.
  • create opt out function

  • create send cake day function

    • should send an embed, with each feild being a number of years the person has been on the server, rounded down. It should avoid duplicated text.
  • create /cakeday upcoming.

    • exclude smited users and opted out users
  • create /cakeday set [date] [user?]

    • if user sets their own cakeday, opt them in
  • cakeday opt [in||out]

  • /infrastructure force cakeday - forces redoing of daily cakeday message.

  • cakeday message opt in/out button.

  • welcome message opt in button

It should incorporate all the feedback from polls

It should not give cake to someone who just joined the server.

add /roll

/roll [roll string] [hidden?] [modifier?:advantage|disadvantage]

MIT license may not be ideal

We have the appropriate authorization to change our license to be whatever we want it to be. Griffin mentioned on the discord that AGPLv3 would be ideal. We need to get input from Duke K before switching, but Kritta, HT, and I are fine with it. Once we get duke's approval, I will make the changes

/Thank [user] [reward days]

Is your feature request related to a problem? Please describe.
People who assist the devs, or other staff members in projects should be rewarded. And XP boosts can easily be done

Describe the solution you'd like
A clear and concise description of what you want to happen.
Moderators, Admins, and Bot Masters should be able to use "/Thank [user] [reward days]".

When used, the target user should be given a XP boost role for a number of days as specified by the command runner.

The XP boost should be removed after that time. If not specified, or less than 1, then at least one day should be granted.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

add /welcome system

  • create message create event handler for welcoming new and returning users.
  • Ensure database entries are updated if new
  • Ensure welcome message for returning users is a welcome back message.
  • Ensure users that have been targeted by /smite do not receive welcome messages, but that the database is updated.
  • generate welcome message using our updated welcome message calculations from the google sheet dynamically
  • create buttons and responses from the Google sheet
  • create /welcome sub commands for temporarily editing the welcome message
  • /welcome reset - sets to default behavior.
  • all subcommands except reset will have the following options: [title] [image url] [description] [days?]
  • all sub commands must enforce character limits.
  • all sub commands will send embeds
  • /welcome append
  • /welcome override

/pulse needs to be ported from other bots

/pulse needs to be ported from project Etu. In addition, the bot should check discord status every ten minutes and send a message to error logs if it detects an outage or outage update. This error log message should ping the bot owner

/rowe-recs

Is your feature request related to a problem? Please describe.
There is no centralized location to see what our glorious wordmaker has recommended we all read.

Describe the solution you'd like
/rowe-recs should return a list of titles, authors, and links to the content, (preferably ebook and if applicable, audible links) of works that the world maker recommends. There must be some form of command to allow moderators+ to add items to this list. If #60 is approved, then when a world maker uses the media promo command, it should automatically add to this list in a format that can be edited by moderators +

Initial versions of the feature will likely just have a server accessed JSON file. Later editions should be moved to google sheets once that functionality is researched

Describe alternatives you've considered
None

Additional context
N/A

Create a database and hook the bot up to it

We need to have a database of our users for a bunch of different things. Our hosting solution only allows for a mySQL database, so I guess we will be using that.

We need to hook the database up through wrapper functions to avoid tightly coupled code

Role reassignment failure

Describe the bug
When the bot is unable to restore roles to someone rejoining, it simply fails, and doesn't alert the moderation team of the person's previous roles.

To Reproduce
Steps to reproduce the behavior:

  1. After having a role the bot cannot assign, leave the server
  2. Rejoin the server
  3. The bot will throw an error, but not alert the mods
  4. See error

Expected behavior
The bot will apply the roles it can, then alert the moderation team of any it cannot

Workarounds:
Mods can manually re apply what roles they think the person should have

MetaData (please complete the following information):
Bot wide issue

Additional context
Add any other context about the problem here.

Add FAQ system:

  • design a system that Should import all the old FAQ files to the Google sheet.
  • design a system that checks the Google sheet and any js files in the FAQ folder, and updates the discord messages accordingly.
  • FAQ should also support .js for dynamic FAQ responses in the form of strings.
    • Role FAQs should be handled dynamically, and roles should have a description for them
  • the bot should not tell people where to find links, just give them the links
  • Add /FAQ [autofill]
  • Add suggested reading order to the FAQ

Port &role from project Etu into /role

Is your feature request related to a problem? Please describe.
Currently, non admins cannot see who has a specific role. This is helpful for debugging.

Describe the solution you'd like

The role command that gives a list of everyone with a certain role and the Id of the role should be ported over.

add /award [helper] [reason] [duration?] [autofill:role?]

Port /thank tp /award

  • duration will default to infinite
  • permissions:
    Admins/bot masters: any roles that are assignable by the bot
    Moderators/Community Guides: Select "awardable" roles
  • allow users to pass their currently awarded roles to others perhaps?
  • Fix spelling errors

/thank

Is your feature request related to a problem? Please describe.
People who assist the devs, or other staff members in projects should be rewarded. And XP boosts can easily be done

Describe the solution you'd like
A clear and concise description of what you want to happen.
Moderators, Admins, and Bot Masters should be able to use "/Thank [user] [reward days]".

When used, the target user should be given a XP boost role for a number of days as specified by the command runner.

The XP boost should be removed after that time. If not specified, or less than 1, then at least one day should be granted.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

add Mod Utility system with the following options: to v3

  • Alert (embed or (color + author info and title + description))- Sends a basic embed to alert the mods of something.
  • RequestApproval(Alert options and approval and denial callback functions, and optionally, the number of moderators required for an approval) - Extends Alert, but adds buttons to the bottom. that do things
  • RequestSpecial(Alert Options, Components object)

add /links:

  • /resources will replace both /repo and /links, and it will be more specific.
  • register /resources [autofill from current /repo, /links and Google sheet]
  • create auto fill handler
  • create auto fill search.
  • create handler to provide the requested link.

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.