Now properly loading youtubeapikey from credentials
This commit is contained in:
parent
30fde5fa83
commit
9e158b53b0
@ -60,8 +60,7 @@ $@"🌍 **Weather for** 【{obj["target"]}】
|
|||||||
await channel.SendMessageAsync("No results found for that query.");
|
await channel.SendMessageAsync("No results found for that query.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var shortUrl = await result.ShortenUrl().ConfigureAwait(false);
|
await channel.SendMessageAsync(result).ConfigureAwait(false);
|
||||||
await channel.SendMessageAsync(shortUrl).ConfigureAwait(false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[LocalizedCommand, LocalizedDescription, LocalizedSummary]
|
[LocalizedCommand, LocalizedDescription, LocalizedSummary]
|
||||||
|
@ -101,7 +101,7 @@ namespace NadekoBot
|
|||||||
}
|
}
|
||||||
else if (!t.IsSuccess && t.Error != CommandError.UnknownCommand)
|
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);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -34,6 +34,7 @@ namespace NadekoBot.Services.Impl
|
|||||||
Token = cm.Token;
|
Token = cm.Token;
|
||||||
OwnerIds = cm.OwnerIds;
|
OwnerIds = cm.OwnerIds;
|
||||||
LoLApiKey = cm.LoLApiKey;
|
LoLApiKey = cm.LoLApiKey;
|
||||||
|
GoogleApiKey = cm.GoogleApiKey;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
_log.Fatal("credentials.json is missing. Failed to start.");
|
_log.Fatal("credentials.json is missing. Failed to start.");
|
||||||
@ -43,6 +44,7 @@ namespace NadekoBot.Services.Impl
|
|||||||
public string Token { get; set; }
|
public string Token { get; set; }
|
||||||
public ulong[] OwnerIds { get; set; }
|
public ulong[] OwnerIds { get; set; }
|
||||||
public string LoLApiKey { get; set; }
|
public string LoLApiKey { get; set; }
|
||||||
|
public string GoogleApiKey { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsOwner(IUser u) => OwnerIds.Contains(u.Id);
|
public bool IsOwner(IUser u) => OwnerIds.Contains(u.Id);
|
||||||
|
Loading…
Reference in New Issue
Block a user