public RuntimeMessage(IMessage msg) { messageData = msg; if (msg.Author != null) { user = new RuntimeUser(msg.Author); } if (msg.Channel != null) { channel = new RuntimeMessageChannel(msg.Channel); } IGuild g = (messageData.Author as IGuildUser)?.Guild; if (g != null) { guild = new RuntimeGuild(g); } }
public RuntimeMessage(IMessage msg, DiscordSocketClient c) { messageData = msg; if (msg.Author != null) { user = new RuntimeUser(msg.Author); } if (msg.Channel != null) { channel = new RuntimeMessageChannel(msg.Channel); } IGuild g = (messageData.Author as IGuildUser)?.Guild; if (g != null) { guild = new RuntimeGuild(g); } client = new RuntimeClient(c); }
public static async Task <RuntimeAudioClient> Create(RuntimeUser u) { return(new RuntimeAudioClient(await(u.ToNativeObject() as IGuildUser).VoiceChannel?.ConnectAsync())); }