So Here is my issue, so the bot has an Auto Moderation system and im trying to make it work while other moderation bots are there too but the issue is that once the message isnot deleted by my bot the bot kept giving me Unknown Message error cuz it has been deleted by another bot so is there a way to check if the message still exists before deleting
Edit: I Fixed the issue by fetching the message and if the message exists the message will get deleted
Related
I've looked all over and I can't find a solution.
I'm using discord js using non-slash commands.
How could I make it so you have a message from the bot and if someone types in the channel the bot's message will get deleted and resent
I want to do this in a sense of a server request channel so you need to add the channel you want the command to run and what you want it to say:
e.g:
Stickied Message
Name:
Request Needed:
Approved By:
how could I program that? Thanks :) <3
I ahve googled online and can't see anything relating to this topic - maybe I'm not searching the right things?
Tried Discord.js V13 | Sticky Message but did not work
Im not able to send a single message from my bot using Discord JS as of v12.
I think before the update (v11) was able just by calling the channel.send('text here') but now I do not how to do it.
In detail: I want to send a message upon the bot connection and not only when someone sends a message; meaning that Im only able to send a message using the client.on('message', msg =>()
You can send messages anytime, as long as the bot is connected and ready.
The only reason why you say you "can't" send messages outside of the message event is because in the message event, you listen for a message event and respond to that message in the same channel.
You want to know how to send a message without a pre-existing message.
Go to the desired channel, right-click it, and click Copy ID. (If Developer Mode isn't on, turn it on in user settings.)
If you are using discord.js v12, use client.channels.cache.get('theChannelID').send('yourmessage'); or if you are using discord.js v11, delete the cache part.
Hope this helps.
If you want to message the same channel of the user's mess, try using message.channel.send(content)
I have a bot with which you have to verify yourself to be on our Discord server
(The verification takes place in the DM`s)
Recently we have the problem that certain members of our Discord cannot write to the bot.
Everyone allowed everyone to send a message to the person
Each of the people is on our Discord Server, allows the person to write messages and have not blocked the bot
The bot does not issue any error messages
We would be delighted to find a quick solution
Since you haven't provided any code snippets, logs or error messages, it's a bit difficult to assess your situation... but here are some basic troubleshooting steps that you could follow:
Remove and re-authenticate the bot into the server.
Double check that you have enabled DM's.
Check the console for any errors that could pertain to direct messaging issues with users in the server. (especially from successful DM's)
Try to notice any differences between the users in the server who are
able to message the bot, versus those who cannot.
Ensure the bot isn't running more than one instance. (i.e. you might
have more than one bot running on the same token!)
I highly recommend giving more detail, because usually a question pertaining to broken/lost functionality would usually attach code or error logs to help diagnose the issue.
Okay, the problem is that you either didn't enable DMs or the bot is not in the server.
Otherwise, this problem will not occur.
I have a client app which listens for added and removed messages from some mailboxes and folders.
There is the possibility to delete a message, I mean marking it as DELETED and expunging it.
Sometimes a user may enter in its web mail client and delete a message (I mean moving it in trash, I'm not talking about GMail which behaves differently)
When such an event happens, the first expunge called by code, returns an array of expunged messages, which contains those messages deleted from web client too, why?
If it is correct, the expected result shouldn't be that expunged messages were permanently removed from trash too? After the expunge messages removed by user via web client, exist yet in trash.
Is it normal? I am a bit confused about expunction...
Thanks
Ever since the latest release a few days ago, our users are constantly being disconnected due to channel tokens going stale with minutes of being created. Our tokens are set to last for 5 hours, but we're lucky if they last for 5-10 minutes and we cannot even reconnect with a new channel token when the channel closes until the user refreshes.
A Javascript error triggers the beginning of it. It looks like this:
NetworkError: 400 Unknown SID - http://89.talkgadget.google.com/talkgadget/dch/bind?VER=8&clid=C9C2EFC06C7C5163&gsessionid&prop=data&token=AHRlWrrWl611ZMMDw8Apgi5vdYuS9UslofxEiJI47-2n4rkPgmuu1z0AN-UNQcyNEvhck-AYAMSLPru8Aumooz62hYNNbLTbi1a3lTSAzGEyj6TsXZirJYE&RID=rpc&SID=BEBDEFDA92C6A9F7&CI=0&AID=54&TYPE=xmlhttp&zx=gsjg8mb1i987&t=1
Then, in Firefox Firebug, the console gets spammed infinitely with
channel name mismatch; message ignored
Until a refresh occurs.
Our site is a real-time interactive site with chat. Our users are sending us emails upset that they keep getting disconnected. They're leaving the site. This is costing us not only goodwill with our user base, but also money and we are powerless to do anything because the bug is with Google App Engine.
Please fix this or rollback to the previous build immediately until you figure this out. The latest build is broken.
I haven't been able to reproduce this but I'm still looking at it. In the meantime: if you explicitly call socket.close() after receiving the error, can you then create a new Channel object and reconnect? If that doesn't work, you could even try manually removing the element with id "wcs-iframe" itself from the DOM. You should be able to use the original token when doing this instead of fetching a new token.