dbm-network / mods

User-made modifications and improvements to Discord Bot Maker.
https://dbm-network.github.io
MIT License
166 stars 202 forks source link

Store Member info doesn't work with events (Member Join Server) #515

Closed Giingu closed 4 years ago

Giingu commented 4 years ago

Describe the bug For some reason, a welcome image command is working when it is used as that, a command, but when it is used as it is supposed (as an event) the avatar image it stores from the user wont be the same in some way, since this one is detected as an unsupport image type. The actions used as an event and command are exactly the same ones, just that the event stores the user with the event trigger and in the command it is stored with the store member info action. To Reproduce Steps to reproduce the behavior:

  1. Make an event
  2. Put the "Member Join Server" trigger
  3. Store the user in a Temp Var
  4. Use store member info to get i'ts avatar url
  5. Try using it in canvas or smthing like that
  6. Then try it but with an command and you will see it is different

Expected behavior User's avatar url is stored just as it is stored with "store member info" on a normal command.

Error

(node:2788) UnhandledPromiseRejectionWarning: Error: Unsupported image type
    at setSource (C:\Users\Zerlingu\Desktop\Discord.Bot.Maker\BotDiscord.Bot.Maker\Nezuko\node_modules\canvas\lib\image.js:91:13)
    at C:\Users\Zerlingu\Desktop\Discord.Bot.Maker\BotDiscord.Bot.Maker\Nezuko\node_modules\canvas\lib\image.js:59:11
    at C:\Users\Zerlingu\Desktop\Discord.Bot.Maker\BotDiscord.Bot.Maker\Nezuko\node_modules\simple-get\index.js:89:7
    at IncomingMessage.<anonymous> (C:\Users\Zerlingu\Desktop\Discord.Bot.Maker\BotDiscord.Bot.Maker\Nezuko\node_modules\simple-concat\index.js:7:13)
    at Object.onceWrapper (events.js:421:28)
    at IncomingMessage.emit (events.js:327:22)
    at endReadableNT (_stream_readable.js:1220:12)
    at processTicksAndRejections (internal/process/task_queues.js:84:21)
(node:2788) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 3)
almeidx commented 4 years ago

Store Member Info is not a mod. However, I have sent a "fix" for it so it stores the avatar URL as png or gif only, instead of webp.