Creating A Discord Bot With Lua

After a few months, I’ve finally figured out how to deploy my bot on Heroku.

If anyone wants to do it.
You can use this buildpack https://github.com/squeek502/heroku-buildpack-luvit

Here’s a little example template for it

1 Like

heres my startsWith() inspired from javascript to detect if user is running using the prefix

function startsWith(String, Pattern)
 local v = true
 for i = #Pattern,0,-1 do
  if String[i] ~= Pattern[i] then
   v = false
  end
 end
 return v
end
1 Like

I have a question. How would I be able to make the bot change its custom status?

1 Like

I had no trouble installing Luvit, but when I ran the command to install Discordia, only the “deps” folder was installed. Here is what I have right now:
image
Does anyone know how I can get the discordia file, gateway, and if it is imporant, the get-lit-32 as well?

2 Likes

The download link for the files does not work.

2 Likes

Is there any list of features, like how to ping someone, how to add emotes etc.

2 Likes

Hello, this looks awesome! I wanted to try it out but unfortunately download file doesn’t works, can you update it? Also I have a question, if I host this bot on my computer or on a server, how can I save data to my computer or to server?

1 Like

I have a question. How would I be able to make the bot change its custom status?

Here is the documentation. Home · SinisterRectus/Discordia Wiki · GitHub

Is there any list of features, like how to ping someone, how to add emotes etc.

Yes, there is a list of features on the documentation. Home · SinisterRectus/Discordia Wiki · GitHub

Does anyone know how I can get the discordia file, gateway, and if it is imporant, the get-lit-32 as well?

You installed it correctly. You have to make the main file, then set up the bot. It will add the gateway.
You can read more about how to use it here: Home · SinisterRectus/Discordia Wiki · GitHub

1 Like

Just install it manually. go here for luvit installation, once it installs the three files, run lit install SinisterRectus/discordia in the current directory.

1 Like

Hate to bump it about 2 years later, but I also believe discord.js is more reliable. I am also a bot developer myself.

1 Like

I managed to fix my issues one week ago lol but thanks anyway ;))

1 Like

Your .zip file with Discordia and everything is broken. :confused:

1 Like

it says access denied. How do i fix it?

1 Like

This is a very smart idea. I know lua video very well and to add it to discord bots is very cool!

1 Like

amount of people shouldn’t matter for the bot’s preformance unless you have a moderation service

1 Like

Replit should do the work! But make sure you pick “Bash project” then go to luvit.io and copy linux command, then paste it to command prompt and hit enter, your components will install! Then do ./lit install SinisterRectus/discordia. Great! You have installed Discordia! Then simply create your lua file and write code or paste it, then create .replit file and put this in it run="./luvit ./yourfilename.lua" so when you press “RUN” your bot runs! Then use another extension called weblit to create server, so when you close page your bot doesn’t go offline, then setup UpTimeRobot and your good to go!

1 Like


Doesn’t seem to work?

1 Like

Add space between ./luvit and ./test.lua

1 Like

And you can remove main.sh it won’t affect your project!

1 Like

discord.py has expired. They have not updated it since

1 Like