在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):SinisterRectus/Discordia开源软件地址(OpenSource Url):https://github.com/SinisterRectus/Discordia开源编程语言(OpenSource Language):Lua 100.0%开源软件介绍(OpenSource Introduction):DiscordiaDiscord API library written in Lua for the Luvit runtime environment IntroductionDiscord is a freeware, multi-platform, voice and text client. It has a documented RESTful API that allows developers to make Discord bots for use on their servers. Luvit is an open-source, asynchronous I/O Lua runtime environment. It is a combination of LuaJIT and libuv, layered with various libraries to provide server-side functionality similar to that of Node.js, but with Lua instead of JavaScript. Luvit's companion package manager, lit, makes it easy to set up the Luvit runtime and its published libraries. Discordia is a Lua wrapper for the official Discord API, and provides a high-level, object-oriented, event-driven interface for developing Discord bots. By using Lua's native coroutines, asynchronous HTTP and WebSocket communication is internally abstracted in a way that allows end-users to write blocking-style code without blocking I/O operations. Join the Discord API server to discuss Discordia and other Discord libraries! Join the independent Discordia server for more! Installation
Examplelocal discordia = require('discordia')
local client = discordia.Client()
client:on('ready', function()
print('Logged in as '.. client.user.username)
end)
client:on('messageCreate', function(message)
if message.content == '!ping' then
message.channel:send('Pong!')
end
end)
client:run('Bot INSERT_TOKEN_HERE') DocumentationPlease visit this project's Wiki for documentation and tutorials. HistoryThe earliest version of Discordia, before it even had that name, was released as a Just Cause 2 Multiplayer module on 7 March 2016. It utilized LuaSocket, LuaSec, and (eventually) Copas to provide basic REST functionality in a sandboxed Lua 5.2 environment. The goal was to bridge the game chat with a Discord client. Due to a lack of WSS support (at the time), the project was put on hold in favor of a general-purpose Lua library for Discord. After finishing a relatively stable version of Discordia, the JC2MP bridge was re-designed to connect with Discordia via inter-process communication. FAQsWhy Lua?
Why Luvit?
Can I run this on a different Lua distribution?
How can I contribute?
Are there other Discord libraries?
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论