private void raid_add_impl(Context ctx, int id, string name, string roles) { //Get a handle to the raid var handle = RaidManager.GetRaidFromID(id).Value; //Extract the roles var extractedRoles = this.raidConfig.MatchRoles(roles); bool bu = roles.ToUpper().Contains("BACKUP"); //Check that we got any roles Precondition.Assert(extractedRoles.Length > 0, "No recognized roles provided!"); //Add to the raid RaidManager.AppendRaider(handle, name, bu, extractedRoles); //Return success Bot.GetBotInstance() .SendSuccessMessage(ctx.message.Channel, "Success", $"They were added to the raid{(bu ? " as backup" : "")} with these roles: \"{string.Join(", ", extractedRoles)}\"." ); }