Ejemplo n.º 1
0
        public async Task SetAlwaysActive(CommandContext ctx, string mention)
        {
            var user = ctx.Guild.Members.First(x => mention.Contains(x.Id.ToString()));

            using (var data = new SqliteDataConnector(ctx.Guild))
            {
                if (!data.IsInDatabase(user))
                {
                    data.SetActive(user);
                    await ctx.Message.RespondAsync(user.Mention + " added to active members");
                }

                data.SetAlwaysActive(user, true);
            }
        }
Ejemplo n.º 2
0
        public async Task SetActive(CommandContext ctx, string mention)
        {
            var user = ctx.Guild.Members.First(x => x.Mention.Equals(mention));

            using (var data = new SqliteDataConnector(ctx.Guild))
            {
                if (!data.IsInDatabase(user))
                {
                    data.SetActive(user);
                    await ctx.Message.RespondAsync(user.Mention + " added to active members");
                }
                else
                {
                    await ctx.Message.RespondAsync(user.DisplayName + " is already an active member");
                }
            }
        }