Questions tagged [luvit]

In Lua, Luvit is an asynchronous I/O library.

24 questions
0
votes
2 answers

Trying to create a discord bot with Discordia and Lua but the kick command keeps crashing it

I'm trying to write a Discord bot with Lua and the Discordia library. I've been trying to implement a way for it to check whether the person running the command has a role to do so. The id for that role is the adminid variable. The bot was working…
0
votes
1 answer

Choosing a Random File lua

Well, like it says in the title I need to figure out how to choose a random file from a folder with no idea on where to start or what to look for. Anyone willing to help me out?
Hex
  • 25
  • 1
  • 3
0
votes
1 answer

An error occurs with a specific set of data

I am currently writing a driver for Luvit, a Lua library which is incompatible with the current Lua-ReQL driver. How would I go about this problem? The data in question, as JSON is, …
DannehSC
  • 21
  • 1
0
votes
0 answers

Attempt to call field 'contains' (a nil value) | How can I check the table to see if it has a server?

What I am trying (Discord Bot) is to make a command called !say serverID channelID arg The point of this command is that I will pm the bot with this command and the bot writes the arg in the defined channelID from the server. Library (litcord):…
jepjep40
  • 181
  • 1
  • 2
  • 12
0
votes
1 answer

How can I check if my "variable" is a valid "ID"

API: https://github.com/satom99/litcord How can I check my valiable if its a valid ID? local cmd, serverID, channelID, arg = string.match(message.content, '(%S+) (%d+) (%d+) (%S+.*)') local server = client.servers:get('id', serverID) serverID…
jepjep40
  • 181
  • 1
  • 2
  • 12
-1
votes
2 answers

Need to verify/check ipv6 address using ping in lua script

i am not aware of lua script but i need some help. Basically current lua script will receive structure. in those structure has address parameter where will get two index parameters(ipv6 & ipv4) addresses. lua script need to implement below…
sundar
  • 1
  • 1
-1
votes
1 answer

Making a bot with discordia/lit/luvit that can kick people

I'm really new to scripting so I wanted my first script to be a discord bot. But I don't know how to make one. Here is the script: Also i might need some basics about lua shouldn't i? local discordia = require('discordia') local coro =…
Orey
  • 3
  • 1
-1
votes
1 answer

How do you execute code or executable .lua files in Luvit repl command prompt?

While in a Linux terminal on a virtual machine, I came across a need to get a bash shell on a particular user, running Luvit repl. I had never previously heard of the program and found very little documentation on it, none of which looked anything…
Matt Eyre
  • 1
  • 1
-2
votes
1 answer

How to insert file lines into table in lua

I'm trying to make a Discord bot with lua and its going well so far, but I'm having a couple problems with the IO portion of lua. I'm trying to read a large list.txt file in lua and inserting each line into a table, but so far all of my attempts…
1
2