[英]Attempt to call upvalue 'Message' (a table value)
So, I'm working on Discord API wrapper written in Lua, but there's an issue, I use rxi's classic module for creating classes and objects, every class works fine, instead of the one class, Message, while trying to create a message in Interaction module, here's the code :所以,我正在研究用 Lua 编写的 Discord API 包装器,但是有一个问题,我使用rxi 的经典模块来创建类和对象,每个类都可以正常工作,而不是一个类 Message,同时尝试在交互模块,代码如下:
message.lua : https://pastebin.com/iMzSZazJ
interaction.lua : https://pastebin.com/G9A1VmBS
Thank's for any help.谢谢你的帮助。
NOTE : Every class that's being created is defined in original code but I had to remove them from codeblocks so StackOverflow let's me post this注意:正在创建的每个类都是在原始代码中定义的,但我必须从代码块中删除它们,所以 StackOverflow 让我发布这个
NOTE 2 : Object class is the rxi's classic注 2:对象类是 rxi 的经典
Here you're calling Message
:您在这里调用
Message
:
self.message = Message(self.d["message"])
Message
is a table value and does not have a metatable implementing the __call metamethod. Message
是一个表值,没有实现 __call 元方法的元表。
Either don't attempt to call it or ensure it can be called.要么不要尝试调用它,要么确保它可以被调用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.