public async Task ClearUserAsync() { DiscordServerInfo guild = Program.Replicant.AvailableServers[Context.Guild.Id]; guild.TargetUserId = null; guild.Locked = true; guild.ClearMessages(); await ReplyAsync("Cleared the replicated user"); }
public async Task SetUserAsync(IUser targetUser) { DiscordServerInfo guild = Program.Replicant.AvailableServers[Context.Guild.Id]; guild.TargetUserId = targetUser.Id; guild.Enabled = false; guild.ClearMessages(); await ReplyAsync($"Set the target replicated player to {Context.Guild.GetUser(targetUser.Id).Nickname}"); await ReplyAsync("Will require a full re-read of server messages to activate (!replicator readall)"); }