Coder Social home page Coder Social logo

manny's Introduction

Manny Splash Image

About

Manny is a friendly mannequin that informs and entertains our Discord community. He has a variety of handy commands that return useful info and resources, plus a few that are just for fun, such as generating a random game idea. He also manages our job board.

Help us improve

If you find a bug or have an idea for a new feature, check the issue tracker to see if someone already mentioned it. If you don't see it, open a new issue.

Contributing

If you're interested in contributing code, please read our contributing guidelines to get started.

Can I invite Manny to my server?

No. Manny is not hosted publicly or designed to work with multiple servers. The main reason the code is open source is to provide the Unreal Slackers community with an opportunity to see how the bot works and contribute directly if they’re interested.

Hosting your own copy of the bot is not supported. If you decide to adapt any of the code for your own purposes, please respect the license.

manny's People

Contributors

pfist avatar dependabot-preview[bot] avatar dependabot[bot] avatar mattyman174 avatar

Stargazers

Vanan A. avatar Ryosuke avatar Daniel avatar  avatar Energy avatar  avatar Mickael Daniel avatar Ed_ avatar fred monroe avatar Mike Slivinski avatar  avatar sinistar avatar Justin Walsh avatar ThanosRes avatar  avatar Myron L Stewart avatar Ethan Thornburg avatar Jack Knobel avatar

Watchers

Garrett avatar James Cloos avatar  avatar BlueMan avatar  avatar

manny's Issues

Job board posts are not being added to the database

Was this issue already reported?

  • I have searched the existing issues

On which platform did you encounter this issue?

Desktop app

What happened

When users add job or portfolio posts to the job board, none of them are being added to the database. This breaks any check for an existing post, including the ability to remove posts.

What you expected

Every job and portfolio command should add the submitted entry to the database.

Steps to reproduce

  1. Go to any text channel
  2. Use any /job or /portfolio command to create a new post
  3. Click the submit button
  4. The post is still submitted to the right channel, but the user sees an error message and the post is never added to the database

Strike command reports an error if Manny can't DM the user

Description

When giving someone a strike, Manny will spit out a "Something went wrong" error if it can't DM the user. This happens even if the strike is successful, so the moderator has to view the #mod-log channel to see if the strike went through.

Steps to reproduce

  1. Give a strike to a user who cannot receive DMs from Manny
  2. Manny returns a "Something went wrong" error, even if the strike was successful

Expected behavior

Manny should always say whether a strike was successful, even if Manny couldn't send a DM.

Report Job Board listings without need to DM a moderator, using: !report <messageID>

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

Job board listings are often times incorrectly posted.

Such as posting a rev-share "looking for team"/recruitment post, to #hire-a-studio

Another example is posting in #permanent-jobs, that you are trying to find a programmer for your video game, but compensation is rev-share when/if the game is released, when there is no studio or entity established.

As of writing this, both of these examples currently exist in the Job Board.

Describe the solution you'd like

Send a DM to Manny:

!report messageID

With the message ID of the Job Board listing in question.

(This command will only work for messages in channels, under the Job Board category.)

After sending Manny !report messageID , either:

  • Manny simply replies, Report successful. Thank you for helping the community! - or something like that.

or

  • Manny replies:
Reply with the number that corresponds best with your reason for report:

1. Trolling

2. Misleading

3. Incorrect compensation for channel

(Of course if going this route, moderators would decide the reasons)

After selecting a number, Manny would reply, Report successful. Thank you for helping the community! - or something like that.

Then Manny would send a message to a mods-only, read-only private channel:

"(Listing) {messageIDHyperlink} has been reported".

Reports: 2

If more users were to report the same listing, Manny would just edit the message in the read-only channel, and increment the Report count from 1 to 2, and so on. Here is a report from Manny using the number-per-reason method.

"(Listing) {messageIDHyperlink} has been reported".

Trolling: 3
Incorrect compensation for channel: 2
Misleading: 0
Total Reports: 5 

This way, moderators could simply check the channels as they have time.
If desired, you could have Manny ping the moderator role after 5 or 7 reports has been reached.

Additionally, I thought a cool feature to this might be the ability to close an open report, by clicking on a react emoji. Maybe a ❌if it's deemed the reports are unnecessary, then Manny will "collapse" the message by editing it to (Listing) {messageIDHyperlink} has been approved by moderators , and any further reports on that listings message ID will be ignored.

To get a message ID, a user would need to enable developer mode for discord to right click a message to copy its ID. Alternatively they could copy the message URL, which contains the message ID. I think this will deter most users for reporting listings just to be a troll.

If you send Manny a !report with a message ID that is not within the Job Board category, Manny will simply not reply, or reply with Invalid command

Describe alternatives you've considered

I described 2 different behaviors for Manny in the above section, but the obvious alternative would be to just DM a moderator, or just tag one in one of the servers. But that's no fun is it?

Additional context

While some may think it to be superfluous, I think that it would make a very nice convivence feature for moderators, get the ball rolling on community collaboration, and it would of course be an honor to add functionality to Manny! Cheers community!

Users can't remove job posts that were made with Manny v1

Was this issue already reported?

  • I have searched the existing issues

On which platform did you encounter this issue?

Desktop app

What happened

If someone posted a job or portfolio with Manny v1, they cannot remove it with Manny v2's /remove command. This is because Manny v2 doesn't search the job board channels for the post; it only searches a database, and only posts made with Manny v2 are added to the database.

When the command fails in this way, it logs an error:

The table `public.Job` does not exist in the current database.
    at RequestHandler.handleRequestError (/home/pfist/bots/manny/node_modules/@prisma/client/runtime/index.js:29754:13)
    at RequestHandler.request (/home/pfist/bots/manny/node_modules/@prisma/client/runtime/index.js:29737:12)
    at async PrismaClient._request (/home/pfist/bots/manny/node_modules/@prisma/client/runtime/index.js:30709:16)
    at async RemovePost.run (file:///home/pfist/bots/manny/src/commands/job-board/remove-post.js:53:22)
    at async CommandHandler.handleSlashCommand (file:///home/pfist/bots/manny/node_modules/hiei.js/src/commands/CommandHandler.js:110:7) {
  code: 'P2021',
  clientVersion: '4.3.0',
  meta: { table: 'public.Job' }
}

The column `Portfolio.channel` does not exist in the current database.
    at RequestHandler.handleRequestError (/home/pfist/bots/manny/node_modules/@prisma/client/runtime/index.js:29754:13)
    at RequestHandler.request (/home/pfist/bots/manny/node_modules/@prisma/client/runtime/index.js:29737:12)
    at async PrismaClient._request (/home/pfist/bots/manny/node_modules/@prisma/client/runtime/index.js:30709:16)
    at async RemovePost.run (file:///home/pfist/bots/manny/src/commands/job-board/remove-post.js:84:22)
    at async CommandHandler.handleSlashCommand (file:///home/pfist/bots/manny/node_modules/hiei.js/src/commands/CommandHandler.js:110:7) {
  code: 'P2022',
  clientVersion: '4.3.0',
  meta: { column: 'Portfolio.channel' }
}

What you expected

The /remove command should work with any job or portfolio post.

Steps to reproduce

  1. Go to any text channel
  2. Type /remove and enter the ID of a job or portfolio posted with Manny 1.x
  3. The command will fail and Manny will log an error

User Info sometimes fails to respond

Was this issue already reported?

  • I have searched the existing issues

On which platform did you encounter this issue?

Desktop app

What happened

Executing the /user command sometimes fails to respond due to this error:

TypeError: Cannot read properties of null (reading 'status')
    at UserInfo.run (file:///home/pfist/bots/manny/src/commands/utility/user-info.js:38:83)
    at CommandHandler.handleSlashCommand (file:///home/pfist/bots/manny/node_modules/hiei.js/src/commands/CommandHandler.js:110:21)
    at HieiClient.<anonymous> (file:///home/pfist/bots/manny/node_modules/hiei.js/src/commands/CommandHandler.js:63:21)
    at HieiClient.emit (node:events:513:28)
    at HieiClient.emit (node:domain:489:12)
    at InteractionCreateAction.handle (/home/pfist/bots/manny/node_modules/discord.js/src/client/actions/InteractionCreate.js:81:12)
    at Object.module.exports [as INTERACTION_CREATE] (/home/pfist/bots/manny/node_modules/discord.js/src/client/websocket/handlers/INTERACTION_CREATE.js:4:36)
    at WebSocketManager.handlePacket (/home/pfist/bots/manny/node_modules/discord.js/src/client/websocket/WebSocketManager.js:352:31)
    at WebSocketShard.onPacket (/home/pfist/bots/manny/node_modules/discord.js/src/client/websocket/WebSocketShard.js:481:22)
    at WebSocketShard.onMessage (/home/pfist/bots/manny/node_modules/discord.js/src/client/websocket/WebSocketShard.js:321:10)

What you expected

This command should always return information about a user that's in the server.

Steps to reproduce

  1. Go to any text channel.
  2. Type /user and select any user.
  3. For certain users, Manny will fail to respond.

Banning with Discord produces mod logs with the wrong information

Description

If you ban someone with Discord (right-click → Ban) instead of Manny, the info logged in the #mod-log channel often shows the incorrect reason. This happens because it's searching the audit logs instead of using a command argument, and the audit log search seems to get info for the ban before the one that just took place.

Steps to reproduce

  1. Right-click → Ban a user from the server
  2. Visit the #mod-log channel
  3. The formatting is different, and info such as moderator, target, and reason are incorrect

Expected behavior

Mod logs for bans should be consistent, regardless of whether they're done through Manny or Discord.

Screenshots

image
Top: Native ban with incorrect info
Bottom: Manny ban with correct info

Improvements to Manny history command.

Is your feature request related to a problem? Please describe.
Manny showing strikes, but not showing pardons/clearing strike when pardon is issued.

Describe the solution you'd like
The history command should be split into 3. Normal history shows just basic information. History --strikes shows only active strikes and bans., History --logs shows full information, including strikes, bans and pardons.

Describe alternatives you've considered
Can't think of alternatives, but there is no way to even know if a strike has been pardoned except searching the log channel.

Additional context
Striking the wrong person leaves a record, this record can not be easily identified as a wrong strike by other moderators. Pardoning should remove the strike info from --strikes and from normal history logging of strikes. (Should say 0 strikes, not 1 if the only strike they had was pardoned). Only --logs should show the full information, and if a strike was pardoned this should be shown next to that strike.

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.