public DatafixerDowngradeResult DowngradeData(ref LanguageConfiguration data) { if (data.DataVersion == "2.0.0.0-beta.001") { return(DatafixerDowngradeResult.AlreadyDowngraded); } data.Configuration.Remove("insanitybot.commands.modlog.paged.page_number"); data.Configuration.Remove("insanitybot.commands.verbal_log.paged.page_number"); data.DataVersion = "2.0.0.0-beta.001"; DatafixerLogger.LogInformation(new EventData(0, 2, 1, 1, "Downgrade"), "Downgraded successfully to version 2.0.0.0-beta.001"); return(DatafixerDowngradeResult.Success); }
public DatafixerUpgradeResult UpgradeData(ref LanguageConfiguration data) { if (data.DataVersion != "2.0.0-dev.00020") { return(DatafixerUpgradeResult.AlreadyUpgraded); } data.Configuration.Add("insanitybot.moderation.slowmode_reset.success", "{CHANNEL} slowmode was removed successfully."); data.Configuration.Add("insanitybot.moderation.slowmode_reset.failure", "Could not remove slowmode for {CHANNEL}."); data.DataVersion = "2.0.0-dev.00022"; DatafixerLogger.LogInformation(new EventData(0, 2, 5, 4, "Upgrade"), "Upgraded successfully to version 2.0.0-dev.00022"); return(DatafixerUpgradeResult.Success); }
public LanguageConfiguration ExportDowngradedData(LanguageConfiguration data) { if (data.DataVersion == "2.0.0-dev.00020") { return(data); } data.Configuration.Remove("insanitybot.moderation.slowmode_reset.success"); data.Configuration.Remove("insanitybot.moderation.slowmode_reset.failure"); data.DataVersion = "2.0.0-dev.00020"; DatafixerLogger.LogInformation(new EventData(0, 2, 5, 2, "ExportDowngrade"), "Downgraded successfully to version 2.0.0-dev.00020"); return(data); }
public DatafixerDowngradeResult DowngradeData(ref LanguageConfiguration data) { if (data.DataVersion == "2.0.0-dev.00020") { return(DatafixerDowngradeResult.AlreadyDowngraded); } data.Configuration.Remove("insanitybot.moderation.slowmode_reset.success"); data.Configuration.Remove("insanitybot.moderation.slowmode_reset.failure"); data.DataVersion = "2.0.0-dev.00020"; DatafixerLogger.LogInformation(new EventData(0, 2, 5, 1, "Downgrade"), "Downgraded successfully to version 2.0.0-dev.00020"); return(DatafixerDowngradeResult.Success); }
public LanguageConfiguration ExportUpgradedData(LanguageConfiguration data) { if (data.DataVersion != "2.0.0-dev.00018") { return(data); } data.Configuration.Add("insanitybot.moderation.slowmode.success", "{CHANNEL} slowmode was set to {TIME}."); data.Configuration.Add("insanitybot.moderation.slowmode.failure", "Could not set slowmode for {CHANNEL}."); data.DataVersion = "2.0.0-dev.00020"; DatafixerLogger.LogInformation(new EventData(0, 2, 4, 3, "ExportUpgrade"), "Upgraded successfully to version 2.0.0-dev.00020"); return(data); }
public DatafixerUpgradeResult UpgradeData(ref MainConfiguration data) { if (data.DataVersion != "2.0.0-dev.00014") { return(DatafixerUpgradeResult.AlreadyUpgraded); } data.Configuration.Add("insanitybot.modlog.allow_scrolling", true); data.Configuration.Add("insanitybot.modlog.allow_verballog_scrolling", true); data.Configuration.Add("insanitybot.identifiers.modlog.scroll_right_emote_id", 0); data.Configuration.Add("insanitybot.identifiers.modlog.scroll_left_emote_id", 0); data.DataVersion = "2.0.0-dev.00016"; DatafixerLogger.LogInformation(new EventData(0, 1, 1, 4, "Upgrade"), "Upgraded successfully to version 2.0.0-dev.00016"); return(DatafixerUpgradeResult.Success); }
public MainConfiguration ExportUpgradedData(MainConfiguration data) { if (data.DataVersion != "2.0.0-dev.00014") { return(data); } data.Configuration.Add("insanitybot.modlog.allow_scrolling", true); data.Configuration.Add("insanitybot.modlog.allow_verballog_scrolling", true); data.Configuration.Add("insanitybot.identifiers.modlog.scroll_right_emote_id", 0); data.Configuration.Add("insanitybot.identifiers.modlog.scroll_left_emote_id", 0); data.DataVersion = "2.0.0-dev.00016"; DatafixerLogger.LogInformation(new EventData(0, 1, 1, 3, "UpgradeExport"), "Upgraded successfully to version 2.0.0-dev.00016"); return(data); }
public DatafixerUpgradeResult UpgradeData(ref MainConfiguration data) { if (data.DataVersion != "2.0.0-dev.00017") { return(DatafixerUpgradeResult.AlreadyUpgraded); } data.Configuration.Add("insanitybot.identifiers.interactivity.scroll_right_emote_id", data["insanitybot.identifiers.modlog.scroll_right_emote_id"]); data.Configuration.Add("insanitybot.identifiers.interactivity.scroll_left_emote_id", data["insanitybot.identifiers.modlog.scroll_left_emote_id"]); data.Configuration.Add("insanitybot.identifiers.interactivity.skip_right_emote_id", 0); data.Configuration.Add("insanitybot.identifiers.interactivity.skip_left_emote_id", 0); data.Configuration.Add("insanitybot.identifiers.interactivity.stop_emote_id", 0); data.Configuration.Add("insanitybot.commands.slowmode.default_slowmode", 5); data.Configuration.Remove("insanitybot.identifiers.modlog.scroll_right_emote_id"); data.Configuration.Remove("insanitybot.identifiers.modlog_scroll_left_emote_id"); data.DataVersion = "2.0.0-dev.00020"; DatafixerLogger.LogInformation(new EventData(0, 1, 3, 4, "Upgrade"), "Upgraded successfully to version 2.0.0-dev.00020"); return(DatafixerUpgradeResult.Success); }
public MainConfiguration ExportDowngradedData(MainConfiguration data) { if (data.DataVersion == "2.0.0-dev.00017") { return(data); } data.Configuration.Add("insanitybot.identifiers.modlog.scroll_right_emote_id", data["insanitybot.identifiers.interactivity.scroll_right_emote_id"]); data.Configuration.Add("insanitybot.identifiers.modlog.scroll_left_emote_id", data["insanitybot.identifiers.interactivity.scroll_left_emote_id"]); data.Configuration.Remove("insanitybot.identifiers.interactivity.scroll_right_emote_id"); data.Configuration.Remove("insanitybot.identifiers.interactivity.scroll_left_emote_id"); data.Configuration.Remove("insanitybot.identifiers.interactivity.skip_right_emote_id"); data.Configuration.Remove("insanitybot.identifiers.interactivity.skip_left_emote_id"); data.Configuration.Remove("insanitybot.identifiers.interactivity.stop_emote_id"); data.Configuration.Remove("insanitybot.commands.slowmode.default_slowmode"); data.DataVersion = "2.0.0-dev.00020"; DatafixerLogger.LogInformation(new EventData(0, 1, 3, 2, "ExportDowngrade"), "Downgraded successfully to version 2.0.0-dev.00017"); return(data); }
public DatafixerUpgradeResult UpgradeData(ref LanguageConfiguration data) { if (data.DataVersion != "2.0.0-dev.00016") { return(DatafixerUpgradeResult.AlreadyUpgraded); } data.Configuration.Add("insanitybot.moderation.lock.success", "{CHANNEL} was locked successfully."); data.Configuration.Add("insanitybot.moderation.lock.failure", "{CHANNEL} could not be locked."); data.Configuration.Add("insanitybot.moderation.unlock.success", "{CHANNEL} was unlocked successfully."); data.Configuration.Add("insanitybot.moderation.unlock.failure", "{CHANNEL} could not be unlocked."); data.Configuration.Add("insanitybot.commands.lock.whitelist.remove.success", "{ROLE} was removed successfully from the whitelist for {CHANNEL}."); data.Configuration.Add("insanitybot.commands.lock.whitelist.remove.failure", "{ROLE} could not be removed from the whitelist for {CHANNEL}."); data.Configuration.Add("insanitybot.commands.lock.blacklist.add.success", "{ROLE} was added successfully to the blacklist for {CHANNEL}."); data.Configuration.Add("insanitybot.commands.lock.blacklist.add.failure", "{ROLE} could not be added to the blacklist for {CHANNEL}."); data.Configuration.Add("insanitybot.commands.lock.blacklist.add.already_present", "{ROLE} was already blacklisted in {CHANNEL}."); data.Configuration.Add("insanitybot.commands.lock.blacklist.remove.success", "{ROLE} was removed successfully from the blacklist for {CHANNEL}."); data.Configuration.Add("insanitybot.commands.lock.blacklist.remove.failure", "{ROLE} could not be removed from the blacklist for {CHANNEL}."); data.DataVersion = "2.0.0-dev.00017"; DatafixerLogger.LogInformation(new EventData(0, 2, 2, 4, "Upgrade"), "Upgraded successfully to version 2.0.0-dev.00017"); return(DatafixerUpgradeResult.AlreadyUpgraded); }
public LanguageConfiguration ExportUpgradedData(LanguageConfiguration data) { if (data.DataVersion != "2.0.0-dev.00017") { return(data); } data.Configuration.Add("insanitybot.permissions.error.permission_not_found", "Permission {PERMISSION} could not be found."); data.Configuration.Add("insanitybot.permissions.error.no_permission_passed", "No permission was passed to the command."); data.Configuration.Add("insanitybot.permissions.error.could_not_parse", "Could not parse command arguments."); data.Configuration.Add("insanitybot.permissions.error.could_not_grant", "Could not grant permission {PERMISSION} to {MENTION}."); data.Configuration.Add("insanitybot.permissions.error.could_not_neutralize", "Could not neutralize permission override {PERMISSION} from {MENTION}"); data.Configuration.Add("insanitybot.permissions.error.could_not_deny", "Could not deny permission {PERMISSION} for {MEMBER}."); data.Configuration.Add("insanitybot.permissions.error.could_not_add_role", "Could not add role {ROLE} to {MENTION}."); data.Configuration.Add("insanitybot.permissions.error.could_not_create", "Failed to create permission file for {MENTION}"); data.Configuration.Add("insanitybot.permissions.error.role_could_not_grant", "Could not grant permission {PERMISSION} to {MENTION}."); data.Configuration.Add("insanitybot.permissions.error.role_could_not_neutralize", "Could not neutralize permission override {PERMISSION} from {MENTION}."); data.Configuration.Add("insanitybot.permissions.error.role_could_not_deny", "Could not deny permission {PERMISSION} for {MENTION}."); data.Configuration.Add("insanitybot.permissions.error.role_could_not_add_parent", "Could not add parent {ROLE} to {MENTION}."); data.Configuration.Add("insanitybot.permissions.error.role_could_not_create", "Failed to create permission file for {MENTION}."); data.Configuration.Add("insanitybot.permissions.permission_granted", "Granted permission {PERMISSION} to {MENTION}"); data.Configuration.Add("insanitybot.permissions.permission_neutralized", "Neutralized permission override {PERMISSION} from {MENTION}"); data.Configuration.Add("insanitybot.permissions.permission_denied", "Denied permission {PERMISSION} for {MENTION}."); data.Configuration.Add("insanitybot.permissions.role_added", "Added role {ROLE} to {MENTION}."); data.Configuration.Add("insanitybot.permissions.user_created", "Created permission file for {MENTION}"); data.Configuration.Add("insanitybot.permissions.role_permission_granted", "Granted permission {PERMISSION} to {MENTION}."); data.Configuration.Add("insanitybot.permissions.role_permission_neutralized", "Neutralized permission override {PERMISSION} from {MENTION}."); data.Configuration.Add("insanitybot.permissions.role_permission_denied", "Denied permission {PERMISSION} for {MENTION}."); data.Configuration.Add("insanitybot.permissions.parent_added", "Added parent {ROLE} to {MENTION}."); data.Configuration.Add("insanitybot.permissions.role_created", "Created permission file for {MENTION}."); data.Configuration.Add("insanitybot.permissions.role_not_found", "Could not find role."); data.DataVersion = "2.0.0-dev.00018"; DatafixerLogger.LogInformation(new EventData(0, 2, 3, 3, "ExportUpgrade"), "Upgraded successfully to version 2.0.0-dev.00018"); return(data); }
public LanguageConfiguration ExportDowngradedData(LanguageConfiguration data) { if (data.DataVersion == "2.0.0-dev.00017") { return(data); } data.Configuration.Remove("insanitybot.permissions.error.permission_not_found"); data.Configuration.Remove("insanitybot.permissions.error.no_permission_passed"); data.Configuration.Remove("insanitybot.permissions.error.could_not_grant"); data.Configuration.Remove("insanitybot.permissions.error.could_not_parse"); data.Configuration.Remove("insanitybot.permissions.error.could_not_neutralize"); data.Configuration.Remove("insanitybot.permissions.error.could_not_add_role"); data.Configuration.Remove("insanitybot.permissions.error.could_not_deny"); data.Configuration.Remove("insanitybot.permissions.error.could_not_create"); data.Configuration.Remove("insanitybot.permissions.error.role_could_not_grant"); data.Configuration.Remove("insanitybot.permissions.error.role_could_not_neutralize"); data.Configuration.Remove("insanitybot.permissions.error.role_could_not_deny"); data.Configuration.Remove("insanitybot.permissions.error.role_could_not_add_parent"); data.Configuration.Remove("insanitybot.permissions.error.role_could_not_create"); data.Configuration.Remove("insanitybot.permissions.permission_granted"); data.Configuration.Remove("insanitybot.permissions.permission_neutralized"); data.Configuration.Remove("insanitybot.permissions.permission_denied"); data.Configuration.Remove("insanitybot.permissions.role_added"); data.Configuration.Remove("insanitybot.permissions.user_created"); data.Configuration.Remove("insanitybot.permissions.role_permission_granted"); data.Configuration.Remove("insanitybot.permissions.role_permission_neutralized"); data.Configuration.Remove("insanitybot.permissions.role_permission_denied"); data.Configuration.Remove("insanitybot.permissions.parent_added"); data.Configuration.Remove("insanitybot.permissions.role_created"); data.Configuration.Remove("insanitybot.permissions.role_not_found"); data.DataVersion = "2.0.0-dev.00017"; DatafixerLogger.LogInformation(new EventData(0, 2, 3, 2, "ExportDowngrade"), "Downgraded successfully to version 2.0.0-dev.00017"); return(data); }