can repl.it host a discord bot using lua
so im making a discord bot using DISCORDIA and LUVIT and I was wondering if Im able to host it on repl.it
(I have NO idea how to host a bot and have never done it before so if someone can go into detail of how to host a LUA DISCORDIA and LUVIT bot then that would be very appreciated!)
Hello, I actually have a answer to your question. Sorry for the late response. Go to your shell and paste in this:
curl -L https://github.com/luvit/lit/raw/master/get-lit.sh | sh then, put all the files that appear into a folder called bin. Next, create a file called
.replit. Type in there:
run = "bin/luvit main.lua". Now go back into shell, and type in:
bin/lit install SinisterRectus/discordia. Now you are good to go! Discordia is now installed and you can require it with
local discordia = require("discordia").
As long as there's a package for it or some way to interact with discord, then yes. From the looks of it, you are using a package. The question is now whether or not you can install the package. If you can, then the answer is yes.
Packages need to be installed to be used. For a package to be installed you generally need a package manager. If you are using a package I expect you to know how to set up the package. Take python for instance. If you import something from python and run it you might see a "package manager installing whatever" or something of the sort. Other languages like Nodejs need you to install a package before you can even call it from your program. Check your repl editor. There might be a cube in the upperish left hand side of your screen. Try typing in the package name. If it's there, install it. After that you can do what you do normally. If it isn't then I don't know how to help you because I don't know lua. If this isn't how packages work in Lua then forgive me, because I don't know Lua at all, I'm just trying to help with info I know from other languages :/
I realize now that Lua doesn't have explicit support for packages.
As long as you can bring that namespace from LuaBotDevPackage (the variables and functions) into your main program, you are good to go.
Read more here