Ejemplo n.º 1
0
        public async Task SetAdmin(ulong id)
        {
            var user = await UserQueries.FindOrCreateUser(id);

            user.Admin = !user.Admin;
            await UserQueries.Update(user);

            await SendMessageAsync($"Updated given user admin status to {user.Admin}.");
        }
Ejemplo n.º 2
0
        public async Task RestrictUser(ulong userId)
        {
            string message;
            var    user = await UserQueries.FindOrCreateUser(userId);

            if (user.Restrict)
            {
                user.Restrict = false;
                message       = $"`Unrestricted user {userId} from using Cake!`";
            }
            else
            {
                user.Restrict = true;
                message       = $"`Restricted user {userId} from using Cake!`";
            }
            await UserQueries.Update(user);

            await SendMessageAsync(message);
        }
Ejemplo n.º 3
0
        public async Task GetUserExperience()
        {
            var user = await UserQueries.FindOrCreateUser(Module.Context.User.Id);

            await SendMessageAsync($"``{user.GetCurrentExp()} xp``");
        }