mirror of
https://github.com/toast-ts/Daggerbot-TS.git
synced 2024-11-18 00:31:00 -05:00
Log the error messages returned by the API
This commit is contained in:
parent
ae32205c9a
commit
4cc1cfec52
@ -29,8 +29,8 @@ export default async(client:TClient)=>{
|
|||||||
headers: {'User-Agent':`${client.user.username} - YTModule/undici`}
|
headers: {'User-Agent':`${client.user.username} - YTModule/undici`}
|
||||||
}).then(async resp=>Data = await resp.body.json());
|
}).then(async resp=>Data = await resp.body.json());
|
||||||
YTChannelName = Data.items[0].snippet.channelTitle;
|
YTChannelName = Data.items[0].snippet.channelTitle;
|
||||||
} catch {
|
} catch (err) {
|
||||||
Logger.console('log', 'YTModule', `Failed to get video data for "${YTChannelName}" from YouTube API`);
|
Logger.console('log', 'YTModule', `Failed to get video data for "${YTChannelID}" from YouTube API: ${err}`);
|
||||||
}
|
}
|
||||||
if (!Data) return;
|
if (!Data) return;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user