Ejemplo n.º 1
0
        private async Task <(DevelopmentStressTestChannel, DiscordChannel)> BuildChannel(DiscordGuild g, DevelopmentStressTestChannel dev)
        {
            var chan = new DevelopmentStressTestChannel()
            {
                GuildId   = dev.GuildId,
                GuildName = dev.GuildName,
                Tags      = GetTags(),
                Name      = $"{Names[ThreadSafeRandom.Next(0, Names.Count)]}-{Names[ThreadSafeRandom.Next(0, Names.Count)]}-{dev.GuildName}"
            };

            DiscordChannel?c = await g.CreateTextChannelAsync(chan.Name, topic : $"Tags: {string.Join(", ", chan.Tags)}", reason : "Partner Test Server Setup");

            chan.ChannelId = c.Id;

            return(chan, c);
        }