- Updated creds_example.yml

- Added credentials.json -> creds.yml migration
- Migrated credentials.json fields are:
  - Token
  - OwnerIds
  - GoogleApiKey
  - OsuApiKey
  - CleverbotApiKey
  - TotalShards (although you should set this from Coordinator's coord.yml TotalShards, so this setting will usually have no effect)
  - PatreonAccessToken and PatreonCampaignId
  - VotesUrl and VotesToken
  - BotListToken
  - RedisOptions
  - LocationIqApiKey and TimezoneDbApiKey
  - CoinmarketcapApiKey
This commit is contained in:
Kwoth
2021-07-12 21:03:43 +02:00
parent 0b71e9c28f
commit 8fb7239100
3 changed files with 66 additions and 10 deletions

View File

@@ -1,6 +1,5 @@
using System.Collections.Generic;
using NadekoBot.Common.Yml;
using NadekoBot.Services;
using YamlDotNet.Serialization;
namespace NadekoBot.Common
@@ -78,9 +77,11 @@ Change only if you've changed the coordinator address or port.")]
public string PatreonCampaignId => Patreon?.CampaignId;
[YamlIgnore]
public string PatreonAccessToken => Patreon?.AccessToken;
public string VotesUrl { get; set; }
public string VotesToken { get; set; }
[YamlIgnore]
public string VotesUrl => Votes?.Url;
[YamlIgnore]
public string VotesToken => Votes.Key;
[Comment(@"Api key obtained on https://rapidapi.com (go to MyApps -> Add New App -> Enter Name -> Application key)")]
public string RapidApiKey { get; set; }
@@ -185,6 +186,9 @@ Windows default
public string VotesToken { get; set; } = string.Empty;
public string VotesUrl { get; set; } = string.Empty;
public string RedisOptions { get; set; } = string.Empty;
public string LocationIqApiKey { get; set; } = string.Empty;
public string TimezoneDbApiKey { get; set; } = string.Empty;
public string CoinmarketcapApiKey { get; set; } = string.Empty;
public class RestartConfig
{