public async Task PairChannelsAsync(ulong guildId, ulong textChannelId, ulong voiceChannelId) { TextChannelSetting textChannel = await this.AddOrGetTextChannelAsync(guildId, textChannelId); textChannel.VoiceChannelId = voiceChannelId; await this.Context.SaveChangesAsync(); }
public async Task <ulong?> GetPairedVoiceChannelIdOrNullAsync(ulong textChannelId) { TextChannelSetting textChannel = await this.Context.FindAsync <TextChannelSetting>(textChannelId); return(textChannel?.VoiceChannelId); }