- Credentials are now loading from creds.yml

- Removed/commented out obsolete credentials code
- Added missing properties to creds.yml
- Updated README.md with some tasks and progress
This commit is contained in:
Kwoth
2021-06-23 18:11:52 +02:00
parent 78d077ce71
commit 16dd398aa0
12 changed files with 254 additions and 290 deletions

View File

@@ -218,7 +218,7 @@ namespace NadekoBot.Modules.Administration.Services
Log.Warning(
"No owner channels created! Make sure you've specified the correct OwnerId in the credentials.json file and invited the bot to a Discord server.");
else
Log.Information($"Created {ownerChannels.Count} out of {_creds.OwnerIds.Length} owner message channels.");
Log.Information($"Created {ownerChannels.Count} out of {_creds.OwnerIds.Count} owner message channels.");
}
public Task LeaveGuild(string guildStr)

View File

@@ -430,7 +430,7 @@ namespace NadekoBot.Modules.Searches
if (!await ValidateQuery(ctx.Channel, name).ConfigureAwait(false))
return;
if (string.IsNullOrWhiteSpace(_creds.MashapeKey))
if (string.IsNullOrWhiteSpace(_creds.RapidApiKey))
{
await ReplyErrorLocalizedAsync("mashape_api_missing").ConfigureAwait(false);
return;

View File

@@ -575,7 +575,7 @@ namespace NadekoBot.Modules.Searches.Services
using (var http = _httpFactory.CreateClient())
{
http.DefaultRequestHeaders.Clear();
http.DefaultRequestHeaders.Add("x-rapidapi-key", _creds.MashapeKey);
http.DefaultRequestHeaders.Add("x-rapidapi-key", _creds.RapidApiKey);
try
{
var response = await http.GetStringAsync($"https://omgvamp-hearthstone-v1.p.rapidapi.com/" +