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 和直接发送消息的API #93

Closed
ForteScarlet opened this issue Jun 28, 2023 · 0 comments · Fixed by #95
Closed

QGBot 增加直接获取 channel 和直接发送消息的API #93

ForteScarlet opened this issue Jun 28, 2023 · 0 comments · Fixed by #95
Labels
特性 New feature or request

Comments

@ForteScarlet
Copy link
Member

ForteScarlet commented Jun 28, 2023

用于避免 bot 没有获取 guild 信息或 channel 信息而导致无法获取对应对象而无法发送消息的情况。

比如

val bot: QGBot = ...

val channel = bot.channel(channelId  = 1234567.ID) // 直接获取 channel

bot.sendTo(message, channelId = 1234567.ID) // 直接发送消息

这两种API可以 “绕过” 获取对象——也就是绕过获取频道/子频道详情而直接发送消息。

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
1 participant