Creating A Discord Bot With Lua

#21

i have a hard time thinking of ideas :frowning:

but thanks anyway, ill check out that deps folder!

#22

@vamik64 Put these on your thread.

Zip File: https://barksites.tk/files/Luvit.zip

Code for an Auto Rebooting Batch file to Launch:

@echo off
:STARTSERVER
PATH-TO-FOLDER\luvit.exe "PATH-TO-FOLDER\LUA-FILE.lua"
echo Rebooting Bot
GOTO STARTSERVER

You can run a bot with the batch file from a single folder which you can then take around with you and move around your computer. You can also replace PATH-TO-FOLDER\luvit.exe "PATH-TO-FOLDER\LUA-FILE.lua" with luvit FILE.lua if the batch file is in that folder.

4 Likes
#23

Wanted to create a self-bot with this, but I guess not, since it says ‘unauthorized’ when I put my token in there.

1 Like
#24

Self-bots are against Discord’s Terms of Service and some libraries are programmed to reject your token when you try to use it.

#25

Well the same happened to me, and I tried that link. It still doesn’t work though, any way to directly download it?

#26

Yes, thread updated!

2 Likes
#27

This is great! Thanks to you, I was able to create this beauty:

4 Likes
#28

Nice. Thank you. :lab_coat: :robot: Im off to make my own bot, finally i know how.

#29

It’s kinda embarrassing to ask this question but how do you shut off the bot without shutting off your PC?
Edit:
It’s fixed now. Had to go through task manager and end the program there but it’s kinda annoying to do that over and over again. Would be even better if the bot’s code could update in real-time when I change bot.lua

#30

What do you mean? You do not need to shut down your PC to stop the bot from running. Just close the command prompt.

#31

When I do close it, it doesn’t shutdown for some odd reason.

#32

That is really strange. Can you send a GIF so I can see the problem in more detail?

#33

Oh, the issue is solved. I had to wait for it to shutdown. It took around a minute for the bot to shutdown.

1 Like
#34

This is incredibly cool! Awesome.

1 Like
#35

I can’t install luvit on raspberry pi so oof.

#36

Pretty sure you can. Are you sure that you can’t install it on raspberry pi?

#37

Hey! I have a question, does this tutorial work on mac?

#38

If anyone is worried about bandwidth, without image uploading, one of my bots i run generally has about 4mbps download and 1mbps upload being used on average at any given time (mega bits), and that’s with 16,000+ guilds, you’re basically looking at barely any bandwidth usage.

1 Like
#39

I basically just explain what discordia is, what luvit is, how to create a discord bot with it using Lua and so on in this topic. It should be the exact same thing with Mac, except the installation, which may be a bit different. https://luvit.io/install.html here is the installation link, if you are having troubles throughout the installation then here are the installed luvit files: https://vamik64.ml/dump/Luvit.zip. Should work for Mac too.

#40

If you install luvit and pm2 on a VPS you can append pm2 doing --interpreter=LUVITPATH The command would look like. pm2 start BOTFILE --interpreter=LUVITPATH However, there is no use using pm2 unless you have a VPS.