Plugins HTTP api type mismatch #5493
Labels
bug
Something isn't working as intended, or works in a confusing/unintuitive way for the user
Feature: EXPERIMENTAL Plugins
Stuff related to EXPERIMENTAL Lua plugin support
Checklist
Describe your issue
HTTP api type definition in the generated
plugin-meta.lua
file definesHTTPResponse.status
as an integer. However, when used in a plugin it is a function that (almost) follows the docs:"Almost", because it says the
data()
function take no parameters, but after using it I realized it needs anHTTPResponse
type table is required as the parameter. The following code is what works for me currently:When calling the
status
function with an incorrect/without a parameter, the following errors are returned:I figured there was a mistake somewhere, but I'm not sure which definition would be correct. Could the docs be fixed to reflect this?
Screenshots
No response
OS and Chatterino Version
Chatterino Nightly 2.5.1 (commit 7bfb5ac) built on 2024-06-23 with Qt 6.7.1, MSVC 194033811 Running on Windows 10 Version 22H2, kernel: 10.0.19045
The text was updated successfully, but these errors were encountered: