Jump to content

[TUT] Adding a Discord bot to your server. [Newbie friendly]


Mr.Loki

Recommended Posts

Posted

Very nice Loki! Hopefully this will help out everyone who needs help setting this whole thing up. It's not an easy thing to do if you're completely new to all of this.

Discord: its.tails

  • 2 weeks later...
Posted
4 hours ago, Mr.Loki said:

@Equis Yes it can work on a local server. Pretty much the same steps.

I mentioned VPS because i know some people have their server based on slots and not a VPS.

Thanks for the respond!

Posted

Can anyone give me an example for sending a command from Discord to MTA.
 

E.G:

!ban random123 reason123
!onlineplayers
 
Btw thank you in advance if anyone could reply.

 

Posted
5 hours ago, Mr.Loki said:

@JamesB

You will need to modify the onDiscordPacket event at line 75 in the discord-events resource.

 

Could you enlighten it, because I don't understand why I should modify that event?

Posted
14 hours ago, JamesB said:

Could you enlighten it, because I don't understand why I should modify that event?

That event captures every thing that happens in the discord server it is connected to.

By monitoring the packed and payload parameters you can see what gets sent to the event.

You can monitor it by using the iprint function.

  • 1 year later...
  • 4 months later...
  • 4 weeks later...
Posted

It gives me this error when i start the bot, or type something in the cmd 

(node:6364) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security
 and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or B
uffer.from() methods instead.

spacer.png

Xd

  • 1 year later...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...