Skip to content

Commit b6e2b95

Browse files
committed
Added ChatThrottleLib
1 parent 0deeb44 commit b6e2b95

File tree

4 files changed

+63
-3
lines changed

4 files changed

+63
-3
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---@meta _
2+
3+
---@class ChatThrottleLib
4+
---[Documentation](https://warcraft.wiki.gg/wiki/ChatThrottleLib)
5+
ChatThrottleLib = {}
6+
7+
---@param prio string
8+
---@param prefix string
9+
---@param text string
10+
---@param chattype string
11+
---@param languageID? number
12+
---@param destination? string
13+
---@param queueName? string
14+
---@param callbackFn? function
15+
---@param callbackArg? any
16+
---[Documentation](https://warcraft.wiki.gg/wiki/ChatThrottleLib#ChatThrottleLib:SendChatMessage)
17+
function ChatThrottleLib:SendChatMessage(prio, prefix, text, chattype, languageID, destination, queueName, callbackFn, callbackArg) end
18+
19+
---@param prio string
20+
---@param prefix string
21+
---@param text string
22+
---@param chattype string
23+
---@param target? string
24+
---@param queueName? string
25+
---@param callbackFn? function
26+
---@param callbackArg? any
27+
---[Documentation](https://warcraft.wiki.gg/wiki/ChatThrottleLib#ChatThrottleLib:SendAddonMessage)
28+
function ChatThrottleLib:SendAddonMessage(prio, prefix, text, chattype, target, queueName, callbackFn, callbackArg) end
29+
30+
---@param prio string
31+
---@param prefix string
32+
---@param text string
33+
---@param chattype string
34+
---@param target? string
35+
---@param queueName? string
36+
---@param callbackFn? function
37+
---@param callbackArg? any
38+
function ChatThrottleLib:SendAddonMessageLogged(prio, prefix, text, chattype, target, queueName, callbackFn, callbackArg) end
39+
40+
---@param prio string
41+
---@param prefix string
42+
---@param text string
43+
---@param chattype string must be WHISPER
44+
---@param gameAccountID number
45+
---@param queueName? string
46+
---@param callbackFn? function
47+
---@param callbackArg? any
48+
function ChatThrottleLib:BNSendGameData(prio, prefix, text, chattype, gameAccountID, queueName, callbackFn, callbackArg) end

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Change Log
22

3+
## [0.17.8] - 2024-11-27
4+
- Added ChatThrottleLib
5+
36
## [0.17.7] - 2024-11-27
47
- Update annotations for patch 11.0.5, 4.4.1, 1.15.5
58

@@ -153,6 +156,7 @@ To avoid loading for Lua projects not related to World of Warcraft, all settings
153156
- PR [#123](https://github.com/Ketho/vscode-wow-api/pull/123) Make childGroups optional in AceConfig.OptionsTable
154157
- PR [#120](https://github.com/Ketho/vscode-wow-api/pull/120) Add definition for tostringall()
155158

159+
[0.17.8]: https://github.com/Ketho/vscode-wow-api/releases/tag/0.17.8
156160
[0.17.7]: https://github.com/Ketho/vscode-wow-api/releases/tag/0.17.7
157161
[0.17.6]: https://github.com/Ketho/vscode-wow-api/releases/tag/0.17.6
158162
[0.17.5]: https://github.com/Ketho/vscode-wow-api/releases/tag/0.17.5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
2+
ChatThrottleLib:SendChatMessage("NORMAL", "someprefix", "hello world", "SAY")
3+
ChatThrottleLib:SendChatMessage("NORMAL", "someprefix", "some dwarfish", "SAY", 6)
4+
5+
ChatThrottleLib:SendAddonMessage("BULK", "someprefix", "hello world", "PARTY")
6+
ChatThrottleLib:SendAddonMessageLogged("NORMAL", "someprefix", "hello world", "PARTY")
7+
8+
ChatThrottleLib:BNSendGameData("NORMAL", "someprefix", "hello world", "WHISPER", 123)

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ Shows completion for GlobalStrings at >3 uppercase letters to declutter fuzzy se
3737

3838
### Activation
3939
This extension will only activate when either:
40-
> - A proper [.toc](https://warcraft.wiki.gg/wiki/TOC_format) file exists when the workspace is opened.
41-
> - The extension was previously loaded in the workspace.
42-
> - The "Activate WoW API extension" command is used.
40+
- A proper [.toc](https://warcraft.wiki.gg/wiki/TOC_format) file exists when the workspace is opened.
41+
- The extension was previously loaded in the workspace.
42+
- The "Activate WoW API extension" command is used.
4343

4444
![](img/readme/activate.png)
4545

0 commit comments

Comments
 (0)