public async messageLink(message: Message, args: Args) {
let region = 'na';
let summoner_name;
console.log('Message Content: ' + message.content);
if (message.content.split(' ').length > 2) {
const regionText = await args.pick('string');
console.log('Region Text: ' + regionText);
if (RiotUtil.isRegion(regionText)) {
region = regionText;
} else {
summoner_name = regionText;
}
}
console.log('Region 1: ' + region);
console.log('Summoner Name 1: ' + summoner_name);
if(summoner_name) {
console.log('region was not specified, combining all args');
summoner_name = summoner_name + await args.rest('string');
console.log('Summoner Name 1.5: ' + summoner_name);
} else {
console.log('region was specified, setting summoner name');
summoner_name = await args.rest('string');
}
console.log('Region 2: ' + region);
console.log('Summoner Name 2: ' + summoner_name);
}