public async Task LoginAs(CommandContext ctx, string username) { var user = User.GetUserByUserName(username); if (!user.Find()) { await ctx.RespondAsync(embed : EmbedTemplates.CreateErrorEmbed("Login As", "Cannot find user")); return; } AccountsService.AddUserToEmulation(ctx.User.Id, user); await ctx.RespondAsync( embed : EmbedTemplates.CreateSuccessEmbed(description: "Logged in as " + user.UserName)); }
public async Task EmulateAs(CommandContext ctx, DiscordMember member) { var user = AccountsService.GetUser(member.Id); if (user == null || !user.Find()) { await ctx.RespondAsync(embed : EmbedTemplates.CreateErrorEmbed(description: "User not found")); return; } AccountsService.AddUserToEmulation(ctx.User.Id, user); await ctx.RespondAsync(embed : EmbedTemplates.CreateSuccessEmbed( description: $"You are now emulating as: {member.Username}#{member.Discriminator} ({user.UserName})")); }