Now properly loading youtubeapikey from credentials

This commit is contained in:
Kwoth 2016-08-21 00:47:39 +02:00
parent 30fde5fa83
commit 9e158b53b0
3 changed files with 4 additions and 3 deletions

View File

@ -60,8 +60,7 @@ $@"🌍 **Weather for** 【{obj["target"]}】
await channel.SendMessageAsync("No results found for that query.");
return;
}
var shortUrl = await result.ShortenUrl().ConfigureAwait(false);
await channel.SendMessageAsync(shortUrl).ConfigureAwait(false);
await channel.SendMessageAsync(result).ConfigureAwait(false);
}
[LocalizedCommand, LocalizedDescription, LocalizedSummary]

View File

@ -101,7 +101,7 @@ namespace NadekoBot
}
else if (!t.IsSuccess && t.Error != CommandError.UnknownCommand)
{
_log.Warn("Command errored!\n\tFull Message: {0}\n\tError:{1}", imsg.Content, t.Error);
_log.Warn("Command errored!\n\tFull Message: {0}\n\tError:{1}", imsg.Content, t.ErrorReason);
}
});

View File

@ -34,6 +34,7 @@ namespace NadekoBot.Services.Impl
Token = cm.Token;
OwnerIds = cm.OwnerIds;
LoLApiKey = cm.LoLApiKey;
GoogleApiKey = cm.GoogleApiKey;
}
else
_log.Fatal("credentials.json is missing. Failed to start.");
@ -43,6 +44,7 @@ namespace NadekoBot.Services.Impl
public string Token { get; set; }
public ulong[] OwnerIds { get; set; }
public string LoLApiKey { get; set; }
public string GoogleApiKey { get; set; }
}
public bool IsOwner(IUser u) => OwnerIds.Contains(u.Id);