【发布时间】:2018-04-22 02:56:53
【问题描述】:
我正在尝试创建一个频道并立即对其进行修改以及通过它发送/接收消息。问题是,在创建它之后,我的客户不知道它存在,因为它是使用休息调用创建的。因此我无法在本地访问它。
有什么方法可以更新或刷新我的客户/公会,以便获得新频道?
这是我想要做的:
private async Task<bool> CreateRoom(SocketGuildUser user)
{
RestTextChannel introRoom = await guild.CreateTextChannelAsync($"channel-{user.Id}"); //guild is a locally saved client.getGuild() call. Need to update?
SocketTextChannel newChannel= guild.GetChannel(introRoom.Id);
return true;
}
我尝试在创建和获取频道之间进行 client.getGuild() 调用,但这似乎不起作用...
【问题讨论】:
标签: c# discord.net