protected async Task <ITextChannel> CreateChannel(string channelname, string channeltopictype, string sender_id) { channelname = channelname.ToLowerInvariant(); channelname = String.Concat(channelname.Where(char.IsLetterOrDigit)); string display_topic = "" + channeltopictype + ":" + sender_id + ""; if (channelname == "interface") { display_topic = "Actions -> !clear, !commands, !help command or command"; } else if (channelname == "status") { display_topic = "Actions -> !clear"; } else if (channelname == "localchat") { display_topic = "Actions -> !clear"; } else if (sender_id == UUID.Zero.ToString()) { display_topic = "" + myconfig.Basic_BotUserName + " #" + MyVersion + ""; } else if (channeltopictype == "Group") { display_topic = "" + channeltopictype + ":" + sender_id + ": Actions -> !clear, !notice title|||message"; } else if (channeltopictype == "IM") { display_topic = "" + channeltopictype + ":" + sender_id + ": Actions -> !clear, !close"; } IGuildChannel channel = await DiscordServer.CreateTextChannelAsync(channelname, X => DiscordGetNewChannelProperies(X, channelname, display_topic, channeltopictype.ToLowerInvariant())); ITextChannel Txtchan = await DiscordServer.GetTextChannelAsync(channel.Id); return(Txtchan); }