Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

为 QGBot 增加直接获取 channel 的能力和直接向指定 channel 发送消息的能力 #95

Merged
merged 2 commits into from
Jul 6, 2023

Conversation

ForliyScarlet
Copy link
Member

val bot: QGBot = ...

// 直接获取channel或category
val channel: QGChannel? = bot.channel(123.ID)
val category: QGChannelCategory? = bot.category(123.ID)

// 直接发送消息
bot.sendTo(123.ID, "text message")
bot.sendTo(123.ID, message)
bot.sendTo(123.ID, messageContent)

Note:
当使用 sendTo 时,你需要自行处理 msgId 的填充,比如拼接使用 QGReplyTo

close #93

@ForliyScarlet ForliyScarlet added the 特性 New feature or request label Jun 30, 2023
@ForteScarlet ForteScarlet merged commit 7a1e14a into dev/main Jul 6, 2023
3 checks passed
@ForteScarlet ForteScarlet deleted the dev/support_#93 branch July 6, 2023 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
特性 New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

QGBot 增加直接获取 channel 和直接发送消息的API
2 participants