vixio help

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the community!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

Mattllama987

Supporter
Aug 5, 2018
225
7
18
Hello, im making a discord bot that moderates all channels. Im making my bot duplicate a message a members sends into a staff member channel. The bot will send link, messages and other stuff. The only thing it wont send, are photos. When a player send a photo, it send a blank message that shows nothing. Ive been asking for help in their discord, but no one seams to help me at all. This is what i have now. I was told it was wrong, but never told how i can correct it. If anyone is good with vixio and knows how to fix this, please let me know ASAP.

Thanks!
~Matt

Vixio version: 2.0.4
Code:

Code:
on guild message received seen by "bot":
    if attachments of event-message is set:
        send "%event-member%: %event-message%" to channel with id "475034012748536368" with event-bot
[doublepost=1581223453,1581108268][/doublepost]bump
[doublepost=1581368791][/doublepost]bump
 
You are saying you are making a skript that shows discord messages in a staff channel to players in Minecraft, but it won't show images? I don't know, but the last time I checked you can't send images in minecraft unless you send a URL. Can't you just make it send a URL?
 
You are saying you are making a skript that shows discord messages in a staff channel to players in Minecraft, but it won't show images? I don't know, but the last time I checked you can't send images in minecraft unless you send a URL. Can't you just make it send a URL?
Thank you for responding to me! But I don’t want to send messages in minecraft at all. I’m making my discord Bot copy the message a member sends in discord, and copies it into another channel in discord. It send all the links, messages and other stuff. It’s just not sending photos into the discord channel I’m trying to copy them to.
 
So you are saying you want all the discord messages in one channel to be copied to a separate channel?
 
So you are saying you want all the discord messages in one channel to be copied to a separate channel?
Exactly. It’s working fine, but the photos are the only thing that won’t send into the separate channel
 
Hmm, I have a discord bot that I wrote with discordjs (I could not find a single documentary on Vixio, can you link me to one if you know of one?) and it doesn't appear to send images either, do you have a bot that uses discordjs aswell?
 
Hmm, I have a discord bot that I wrote with discordjs (I could not find a single documentary on Vixio, can you link me to one if you know of one?) and it doesn't appear to send images either, do you have a bot that uses discordjs aswell?
I know nothing about their documentary. But what exactly is discordjs?
 
Discordjs is a node.js (js as in JavaScript) module that allows you to interact with the Discord API super easily.
[doublepost=1581389544,1581388872][/doublepost]I'm looking at my console here for when I send an image and it comes with an error saying this:

Code:
(node:22) UnhandledPromiseRejectionWarning: DiscordAPIError: Cannot send an empty message
at item.request.gen.end (/home/container/node_modules/discord.js/src/client/rest/RequestHandlers/Sequential.js:85:15)
at then (/home/container/node_modules/discord.js/node_modules/snekfetch/src/index.js:215:21)
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:22) 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(). (rejection id: 2)
(node:22) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

This is basically saying that it cannot send an empty message, so when a player sends an image, it doesn't detect that as a message since there isn't any text (I am sending an image and an image only). A work around this is to detect if there is an image in the message, and if there is you can get the URL of that image and send the URL instead. It's a sacrifice of some good looking replication for functionality, but it won't make that big of a difference, or you can do the same but have it be hyperlinked with no text to actually click on, maybe it will show then?

However, it appears maybe some code i'm using is deprecated? I'll look into that later.
 
Status
Not open for further replies.