Skip to content
This repository was archived by the owner on Aug 16, 2024. It is now read-only.

Commit 6f134e2

Browse files
committed
更新: 指令系统示例
1 parent 8470bcf commit 6f134e2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

examples/Command.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ int main()
2727

2828
try
2929
{
30-
bot.RegisterCommand("hello", { "hi" }, "helloddd", "helllll");
30+
bot.RegisterCommand("hello", { "hi","你好" }, "指令描述描述描述", "使用方法:/hello 你想说的话");
3131
auto managers = bot.GetManagers();
3232
for (auto manager : managers)
3333
{
@@ -51,7 +51,8 @@ int main()
5151
cout << endl;
5252
});
5353

54-
bot.SendCommand("hello", {});
54+
// 发送指令
55+
bot.SendCommand("hello", { "arg1","arg2" });
5556

5657
bot.EventLoop();
5758
return 0;

0 commit comments

Comments
 (0)