CCVars.Discord.cs 4.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. using Robust.Shared.Configuration;
  2. namespace Content.Shared.CCVar;
  3. public sealed partial class CCVars
  4. {
  5. /// <summary>
  6. /// The role that will get mentioned if a new SOS ahelp comes in.
  7. /// </summary>
  8. public static readonly CVarDef<string> DiscordAhelpMention =
  9. CVarDef.Create("discord.on_call_ping", string.Empty, CVar.SERVERONLY | CVar.CONFIDENTIAL);
  10. /// <summary>
  11. /// URL of the discord webhook to relay unanswered ahelp messages.
  12. /// </summary>
  13. public static readonly CVarDef<string> DiscordOnCallWebhook =
  14. CVarDef.Create("discord.on_call_webhook", string.Empty, CVar.SERVERONLY | CVar.CONFIDENTIAL);
  15. /// <summary>
  16. /// URL of the Discord webhook which will relay all ahelp messages.
  17. /// </summary>
  18. public static readonly CVarDef<string> DiscordAHelpWebhook =
  19. CVarDef.Create("discord.ahelp_webhook", string.Empty, CVar.SERVERONLY | CVar.CONFIDENTIAL);
  20. /// <summary>
  21. /// The server icon to use in the Discord ahelp embed footer.
  22. /// Valid values are specified at https://discord.com/developers/docs/resources/channel#embed-object-embed-footer-structure.
  23. /// </summary>
  24. public static readonly CVarDef<string> DiscordAHelpFooterIcon =
  25. CVarDef.Create("discord.ahelp_footer_icon", string.Empty, CVar.SERVERONLY);
  26. /// <summary>
  27. /// The avatar to use for the webhook. Should be an URL.
  28. /// </summary>
  29. public static readonly CVarDef<string> DiscordAHelpAvatar =
  30. CVarDef.Create("discord.ahelp_avatar", string.Empty, CVar.SERVERONLY);
  31. /// <summary>
  32. /// URL of the Discord webhook which will relay all custom votes. If left empty, disables the webhook.
  33. /// </summary>
  34. public static readonly CVarDef<string> DiscordVoteWebhook =
  35. CVarDef.Create("discord.vote_webhook", string.Empty, CVar.SERVERONLY);
  36. /// <summary>
  37. /// URL of the Discord webhook which will relay all votekick votes. If left empty, disables the webhook.
  38. /// </summary>
  39. public static readonly CVarDef<string> DiscordVotekickWebhook =
  40. CVarDef.Create("discord.votekick_webhook", string.Empty, CVar.SERVERONLY);
  41. /// <summary>
  42. /// URL of the Discord webhook which will relay round restart messages.
  43. /// </summary>
  44. public static readonly CVarDef<string> DiscordRoundUpdateWebhook =
  45. CVarDef.Create("discord.round_update_webhook", string.Empty, CVar.SERVERONLY | CVar.CONFIDENTIAL);
  46. /// <summary>
  47. /// Role id for the Discord webhook to ping when the round ends.
  48. /// </summary>
  49. public static readonly CVarDef<string> DiscordRoundEndRoleWebhook =
  50. CVarDef.Create("discord.round_end_role", string.Empty, CVar.SERVERONLY);
  51. /// <summary>
  52. /// The token used to authenticate with Discord. For the Bot to function set: discord.token, discord.guild_id, and discord.prefix.
  53. /// If this is empty, the bot will not connect.
  54. /// </summary>
  55. public static readonly CVarDef<string> DiscordToken =
  56. CVarDef.Create("discord.token", string.Empty, CVar.SERVERONLY | CVar.CONFIDENTIAL);
  57. /// <summary>
  58. /// The Discord guild ID to use for commands as well as for several other features.
  59. /// If this is empty, the bot will not connect.
  60. /// </summary>
  61. public static readonly CVarDef<string> DiscordGuildId =
  62. CVarDef.Create("discord.guild_id", string.Empty, CVar.SERVERONLY);
  63. /// <summary>
  64. /// Prefix used for commands for the Discord bot.
  65. /// If this is empty, the bot will not connect.
  66. /// </summary>
  67. public static readonly CVarDef<string> DiscordPrefix =
  68. CVarDef.Create("discord.prefix", "!", CVar.SERVERONLY);
  69. /// <summary>
  70. /// URL of the Discord webhook which will relay watchlist connection notifications. If left empty, disables the webhook.
  71. /// </summary>
  72. public static readonly CVarDef<string> DiscordWatchlistConnectionWebhook =
  73. CVarDef.Create("discord.watchlist_connection_webhook", string.Empty, CVar.SERVERONLY | CVar.CONFIDENTIAL);
  74. /// <summary>
  75. /// How long to buffer watchlist connections for, in seconds.
  76. /// All connections within this amount of time from the first one will be batched and sent as a single
  77. /// Discord notification. If zero, always sends a separate notification for each connection (not recommended).
  78. /// </summary>
  79. public static readonly CVarDef<float> DiscordWatchlistConnectionBufferTime =
  80. CVarDef.Create("discord.watchlist_connection_buffer_time", 5f, CVar.SERVERONLY);
  81. }