fix default MKT

This commit is contained in:
loicbersier 2020-02-18 19:49:47 +01:00
parent c0985b22c4
commit 07d29e8c1d

View file

@ -24,8 +24,7 @@ class wallpaperCommand extends Command {
async exec(message, args) { async exec(message, args) {
let mkt = args.region; let mkt = args.region;
console.log(mkt); if (!args.region) mkt = 'en-US';
if (!args.region) mkt = 'en-us';
if (!['zh-CN', 'en-US', 'ja-JP', 'en-AU', 'en-UK', 'de-DE', 'en-NZ', 'en-CA'].includes(mkt)) return message.channel.send('Please choose a valid region settings: zh-CN, en-US, ja-JP, en-AU, en-UK, de-DE, en-NZ, en-CA'); if (!['zh-CN', 'en-US', 'ja-JP', 'en-AU', 'en-UK', 'de-DE', 'en-NZ', 'en-CA'].includes(mkt)) return message.channel.send('Please choose a valid region settings: zh-CN, en-US, ja-JP, en-AU, en-UK, de-DE, en-NZ, en-CA');
fetch(`https://bing.biturl.top/?mkt=${mkt}`) fetch(`https://bing.biturl.top/?mkt=${mkt}`)
.then(res => { .then(res => {