public static async Task UserJoinedServer(SocketGuildUser guildUser) { var chnl = guildUser.Guild.GetChannel(Config.TheNoobGateChannel) as ITextChannel; var mainchnl = guildUser.Guild.GetChannel(Config.MeleeSlasherMainChannel) as ITextChannel; var insult = await Insults.GetInsult(); Random rnd = new Random(); var noobRole = Helpers.FindRole(guildUser, UtilityRoles.Noob); await guildUser.AddRoleAsync(noobRole); if (CommandToggles.WelcomeMessages) { var welcomeMessageMain = await WarmWelcome.GetWelcomeArrayMain(guildUser, rnd); await mainchnl.SendMessageAsync(welcomeMessageMain); } ITextChannel logChannel = guildUser.Guild.GetChannel(Config.UserJoinedLogChannel) as ITextChannel; await logChannel.SendMessageAsync($"{guildUser.Username}#{guildUser.Discriminator} joined Melee Slasher. UserID = {guildUser.Id}"); var messageInfo = "Write +help for instructions"; var greetingMessage = await WarmWelcome.GetWelcomeArrayNoobGate(guildUser, rnd) + "\n" + messageInfo; _ = Task.Run(async() => await GreetUser(chnl, greetingMessage)); }
public async Task HelpAsync() { if (Context.Message.Channel.Id != Config.TheNoobGateChannel) { return; } var insult = await Insults.GetInsult(); Random rnd = new Random(); var welcomeMsg = await WarmWelcome.GetHelpfulNoobString(); await Context.Channel.SendMessageAsync(welcomeMsg); }