Streaming external websocket backend state to a discord channel

Hey I have a discord bot that is connected to a separate websocket backend with WebSockets. I want the bot to show the backend servers state on a discord channel, should I just make the bot send a message that shows the backend server state and then edit that message on every backend state change? I am listening to the websocket backend server changes with the discord bot
18 Replies
d.js toolkit
d.js toolkit17mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button!
ooi cat
ooi catOP17mo ago
so basically in my discord.js bot:
ooi cat
ooi catOP17mo ago
this will listen to the external backend websocket server I want to show this event.data on my discord server through this bot and I want to have it all in one message, and make that one original message update on changes
Cartoon
Cartoon17mo ago
hey
ooi cat
ooi catOP17mo ago
Is this idea even half decent or should I just ditch the discord bot and do website client that talks to the backend websocket server
Cartoon
Cartoon17mo ago
can you send me your discord bot stuff that you have in it I wantto start making disocrd bot but do not know how to make cmds and what i need in the Files
ooi cat
ooi catOP17mo ago
you can make commands using the slashcommandbuilder or just by typing the commands out yourself then set the commands guild-based/globally based on your purposes using commands.set
Cartoon
Cartoon17mo ago
okok
ooi cat
ooi catOP17mo ago
I think this discord has guides for getting started, and there are discord.js docs this is just a singular post asking for question about websockets
Cartoon
Cartoon17mo ago
ok
space
space17mo ago
Probably a matter of preference whether to use a message in Discord or a status website. As long as the state (and along with it the message) is not excessively updating, it should be fine. Note that Discord really does not like bots using channel names or topics for this.
ooi cat
ooi catOP17mo ago
Thank you for the inisight. What I am working on is the following backend: ws server (game queue with mmr based matchmaking, connected to a database), kind of like matchmaking as a service backend client: discord bot OR website the reason I'd like to use discord as a client is that my userbase is in discord. However, in web world streaming backend state in real time for this seems easier to implement, at least for me. Have it working already on web, but want to see if it can work in a discord text channel the client can basically be anything, as long as it can stream the matchmaking state for the users and btw, what did your last sentence mean? Sorry for my poor english/understanding
space
space17mo ago
Don't automatically update channel names or topics for these things, as Discord doesn't want bots to do that.
ooi cat
ooi catOP17mo ago
So you are saying it's not a good idea?
space
space17mo ago
Using a message should be fine.
ooi cat
ooi catOP17mo ago
oh, yeah, that's all I really want just one message with a reference to it and keep updating everything on it thanks!!!! also love the last emote on ur name
space
space17mo ago
staffCat
ooi cat
ooi catOP17mo ago
catsurprised1
Want results from more Discord servers?
Add your server