Example #1
0
        public async Task Invoke(SocketUserMessage msg)
        {
            if (msg.MentionedRoles.Count > 0)
            {
                foreach (var role in msg.MentionedRoles)
                {
                    await _roleService.AddAdmin(role);
                }

                var successResponse =
                    $"Added roles: {string.Join(", ", msg.MentionedRoles.Select(x => x.Name))} as admin";
                await msg.Channel.SendMessageAsync(successResponse);
            }
            else
            {
                await msg.Channel.SendMessageAsync("Please mention one or more roles");
            }
        }