我如何使用hikari使用命令在不同的频道中在不同的频道中说出一条消息
我正在尝试使我的hikari bot使用命令说我在命令中输入的消息到另一个/不同的频道。基本上,我想让机器人在另一个频道中说出我的消息。
I am trying to make my Hikari bot use commands to say the message I input in the command to another/diferent channel. Basically, I want to make the bot say my messages in another channel.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
只要您要将消息发送到频道的ID,就可以使用
create_message
bot的方法impl/rest.html#hikari.impl.rest.restclientimpl“ rel =” nofollow noreferrer“>retclientimpl
实例:例如:
上面的消息将发送带有content
foo foo的消息
带有给定channel_id
的通道。As long as you have the ID of the channel you would like to send the message to, you can use the
create_message
method of the bot'sRestClientImpl
instance:For Example:
The above would send a message with content
foo
to the channel with the givenchannel_id
.