-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fomorian/Razorback construction and Events #125
Conversation
src/embeds/ConstructionEmbed.js
Outdated
|
||
this.color = 0xff6961; | ||
this.fields = [{ | ||
name: `[${platform}] Construction Status:`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Expected indentation of 6 spaces but found 8. (indent)
src/embeds/ConstructionEmbed.js
Outdated
this.color = 0xff6961; | ||
this.fields = [{ | ||
name: `[${platform}] Construction Status:`, | ||
value: '```' + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Expected indentation of 6 spaces but found 8. (indent)
src/embeds/ConstructionEmbed.js
Outdated
this.fields = [{ | ||
name: `[${platform}] Construction Status:`, | ||
value: '```' + | ||
`Razorback: ${construction.razorbackProgress}` + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'construction' is not defined. (no-undef)
src/embeds/ConstructionEmbed.js
Outdated
name: `[${platform}] Construction Status:`, | ||
value: '```' + | ||
`Razorback: ${construction.razorbackProgress}` + | ||
`Fomorian: ${construction.fomorianProgress}` + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'construction' is not defined. (no-undef)
src/embeds/ConstructionEmbed.js
Outdated
value: '```' + | ||
`Razorback: ${construction.razorbackProgress}` + | ||
`Fomorian: ${construction.fomorianProgress}` + | ||
`Unknown: ${construction.unknwonProgress}` + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'construction' is not defined. (no-undef)
src/embeds/ConstructionEmbed.js
Outdated
`Razorback: ${construction.razorbackProgress}` + | ||
`Fomorian: ${construction.fomorianProgress}` + | ||
`Unknown: ${construction.unknwonProgress}` + | ||
'```' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing trailing comma. (comma-dangle)
src/embeds/EventEmbed.js
Outdated
this.color = 0xfdec96; | ||
|
||
if (event) { | ||
this.title = `[${platform}] ${event.description}`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Expected indentation of 6 spaces but found 8. (indent)
src/embeds/EventEmbed.js
Outdated
|
||
if (event) { | ||
this.title = `[${platform}] ${event.description}`; | ||
this.fields = []; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Expected indentation of 6 spaces but found 8. (indent)
src/embeds/EventEmbed.js
Outdated
this.title = `[${platform}] ${event.description}`; | ||
this.fields = []; | ||
|
||
if (event.victimNode) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Expected indentation of 6 spaces but found 8. (indent)
src/embeds/EventEmbed.js
Outdated
this.fields = []; | ||
|
||
if (event.victimNode) { | ||
this.fields.push({name: '_ _', value: `Defend ${event.victimNode} by attacking the ${event.faction} at ${event.node}.` }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Expected indentation of 10 spaces but found 12. (indent)
A space is required after '{'. (object-curly-spacing)
src/embeds/EventEmbed.js
Outdated
if (event.victimNode) { | ||
this.fields.push({name: '_ _', value: `Defend ${event.victimNode} by attacking the ${event.faction} at ${event.node}.` }); | ||
} | ||
this.fields.push({ name: 'Rewards', value: event.rewards.map(reward => reward.asString).join('; ') }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Expected indentation of 6 spaces but found 8. (indent)
src/embeds/EventEmbed.js
Outdated
this.fields.push({name: '_ _', value: `Defend ${event.victimNode} by attacking the ${event.faction} at ${event.node}.` }); | ||
} | ||
this.fields.push({ name: 'Rewards', value: event.rewards.map(reward => reward.asString).join('; ') }); | ||
this.fields.push({ name: 'Completion Score', value: String(event.maximumScore) }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Expected indentation of 6 spaces but found 8. (indent)
src/embeds/EventEmbed.js
Outdated
this.fields.push({ name: 'Rewards', value: event.rewards.map(reward => reward.asString).join('; ') }); | ||
this.fields.push({ name: 'Completion Score', value: String(event.maximumScore) }); | ||
} else { | ||
this.title = 'No Current Events'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Expected indentation of 6 spaces but found 8. (indent)
const platformParam = message.strippedContent.match(this.regex)[1]; | ||
const platform = platformParam || await this.bot.settings.getChannelSetting(message.channel, 'platform'); | ||
const ws = await this.bot.caches[platform].getDataJson(); | ||
await this.messageManager.embed(message, new EventEmbed(this.bot, ws.constructionProgress, platform.toUpperCase()), true, true)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Parsing error: Unexpected token )
src/commands/Worldstate/Event.js
Outdated
await Promise.all(results); | ||
return this.messageManager.statuses.SUCCESS; | ||
} | ||
await this.messageManager.embed(message, new EventEmbed(this.bot, undefined, platform.toUpperCase()), true, true)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Parsing error: Unexpected token )
const platformParam = message.strippedContent.match(this.regex)[1]; | ||
const platform = platformParam || await this.bot.settings.getChannelSetting(message.channel, 'platform'); | ||
const ws = await this.bot.caches[platform].getDataJson(); | ||
await this.messageManager.embed(message, new EventEmbed(this.bot, ws.constructionProgress, platform.toUpperCase()), true, true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line 23 exceeds the maximum line length of 100. (max-len)
src/commands/Worldstate/Event.js
Outdated
await Promise.all(results); | ||
return this.messageManager.statuses.SUCCESS; | ||
} | ||
await this.messageManager.embed(message, new EventEmbed(this.bot, undefined, platform.toUpperCase()), true, true)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Parsing error: Unexpected token )
src/commands/Worldstate/Event.js
Outdated
const platform = platformParam || await this.bot.settings.getChannelSetting(message.channel, 'platform'); | ||
const ws = await this.bot.caches[platform].getDataJson(); | ||
if (ws.events.length > 0) { | ||
const results = []; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Expected indentation of 6 spaces but found 8. (indent)
src/commands/Worldstate/Event.js
Outdated
const ws = await this.bot.caches[platform].getDataJson(); | ||
if (ws.events.length > 0) { | ||
const results = []; | ||
ws.events.forEach(event => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Expected indentation of 6 spaces but found 8. (indent)
Expected parentheses around arrow function argument having a body with curly braces. (arrow-parens)
src/commands/Worldstate/Event.js
Outdated
if (ws.events.length > 0) { | ||
const results = []; | ||
ws.events.forEach(event => { | ||
results.push(this.messageManager.embed(message, new EventEmbed(this.bot, event, platform.toUpperCase()), true, true)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line 26 exceeds the maximum line length of 100. (max-len)
Expected indentation of 10 spaces but found 12. (indent)
src/commands/Worldstate/Event.js
Outdated
ws.events.forEach(event => { | ||
results.push(this.messageManager.embed(message, new EventEmbed(this.bot, event, platform.toUpperCase()), true, true)); | ||
}); | ||
await Promise.all(results); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Expected indentation of 6 spaces but found 8. (indent)
src/commands/Worldstate/Event.js
Outdated
results.push(this.messageManager.embed(message, new EventEmbed(this.bot, event, platform.toUpperCase()), true, true)); | ||
}); | ||
await Promise.all(results); | ||
return this.messageManager.statuses.SUCCESS; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Expected indentation of 6 spaces but found 8. (indent)
src/commands/Worldstate/Event.js
Outdated
await Promise.all(results); | ||
return this.messageManager.statuses.SUCCESS; | ||
} | ||
await this.messageManager.embed(message, new EventEmbed(this.bot, undefined, platform.toUpperCase()), true, true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line 31 exceeds the maximum line length of 100. (max-len)
src/embeds/ConstructionEmbed.js
Outdated
this.fields = [{ | ||
name: `[${platform}] Construction Status:`, | ||
value: '```' + | ||
`Razorback: ${construction.razorbackProgress}` + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'construction' is not defined. (no-undef)
src/embeds/ConstructionEmbed.js
Outdated
name: `[${platform}] Construction Status:`, | ||
value: '```' + | ||
`Razorback: ${construction.razorbackProgress}` + | ||
`Fomorian: ${construction.fomorianProgress}` + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'construction' is not defined. (no-undef)
src/embeds/ConstructionEmbed.js
Outdated
value: '```' + | ||
`Razorback: ${construction.razorbackProgress}` + | ||
`Fomorian: ${construction.fomorianProgress}` + | ||
`Unknown: ${construction.unknwonProgress}` + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'construction' is not defined. (no-undef)
src/embeds/ConstructionEmbed.js
Outdated
`Razorback: ${construction.razorbackProgress}` + | ||
`Fomorian: ${construction.fomorianProgress}` + | ||
`Unknown: ${construction.unknwonProgress}` + | ||
'```' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing trailing comma. (comma-dangle)
src/embeds/EventEmbed.js
Outdated
this.fields = []; | ||
|
||
if (event.victimNode) { | ||
this.fields.push({name: '_ _', value: `Defend ${event.victimNode} by attacking the ${event.faction} at ${event.node}.` }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Expected indentation of 8 spaces but found 10. (indent)
A space is required after '{'. (object-curly-spacing)
src/commands/Worldstate/Event.js
Outdated
const ws = await this.bot.caches[platform].getDataJson(); | ||
if (ws.events.length > 0) { | ||
const results = []; | ||
ws.events.forEach(event => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Expected parentheses around arrow function argument having a body with curly braces. (arrow-parens)
src/commands/Worldstate/Event.js
Outdated
if (ws.events.length > 0) { | ||
const results = []; | ||
ws.events.forEach(event => { | ||
results.push(this.messageManager.embed(message, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Expected indentation of 8 spaces but found 10. (indent)
Trailing spaces not allowed. (no-trailing-spaces)
src/commands/Worldstate/Event.js
Outdated
await Promise.all(results); | ||
return this.messageManager.statuses.SUCCESS; | ||
} | ||
await this.messageManager.embed(message, new EventEmbed(this.bot, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trailing spaces not allowed. (no-trailing-spaces)
src/commands/Worldstate/Event.js
Outdated
if (ws.events.length > 0) { | ||
const results = []; | ||
ws.events.forEach((event) => { | ||
results.push(this.messageManager.embed(message, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Expected indentation of 8 spaces but found 10. (indent)
src/embeds/EventEmbed.js
Outdated
this.fields = []; | ||
|
||
if (event.victimNode) { | ||
this.fields.push({ name: '_ _', value: `Defend ${event.victimNode}` + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Object properties must go on a new line if they aren't all on the same line. (object-property-newline)
gonna test these when i'm home before i give it the ol +1 |
* adding embeds * Add commands for previously added embeds * fix bad parentheses * fix parens * fix indents * fix indents * fix comma and syntax (construction didn't exist) * fix some indents and line length * fix line length * fix line length * stickler fixes * fix indentation * fix indents * Update EventEmbed.js * add health to event * add platform to notifications and commands default trials to auto-delete update raven change some logic for pricecheck embeds fix for event embed messup fix reward map issue fix bad news embed call add type for prime access notifications another of above for updates test fix for set ping Async fixes (#126) * make fatals and errors not log twice, cleanup logger typedef * add logging for notifier * fix some missing awaits. * cleanup some debugs * slim down debug * more debugs * more * hopeful fix, awaiting callback function * better formatting, abstract out wiki search for image * fix construction progress * more formatting for construction embed
* adding embeds * Add commands for previously added embeds * fix bad parentheses * fix parens * fix indents * fix indents * fix comma and syntax (construction didn't exist) * fix some indents and line length * fix line length * fix line length * stickler fixes * fix indentation * fix indents * Update EventEmbed.js * add health to event * add platform to notifications and commands default trials to auto-delete update raven change some logic for pricecheck embeds fix for event embed messup fix reward map issue fix bad news embed call add type for prime access notifications another of above for updates test fix for set ping Async fixes (#126) * make fatals and errors not log twice, cleanup logger typedef * add logging for notifier * fix some missing awaits. * cleanup some debugs * slim down debug * more debugs * more * hopeful fix, awaiting callback function * better formatting, abstract out wiki search for image * fix construction progress * more formatting for construction embed Fomorian/Razorback construction and Events (#125) * adding embeds * Add commands for previously added embeds * fix bad parentheses * fix parens * fix indents * fix indents * fix comma and syntax (construction didn't exist) * fix some indents and line length * fix line length * fix line length * stickler fixes * fix indentation * fix indents * Update EventEmbed.js * add health to event * add platform to notifications and commands default trials to auto-delete update raven change some logic for pricecheck embeds fix for event embed messup fix reward map issue fix bad news embed call add type for prime access notifications another of above for updates test fix for set ping Async fixes (#126) * make fatals and errors not log twice, cleanup logger typedef * add logging for notifier * fix some missing awaits. * cleanup some debugs * slim down debug * more debugs * more * hopeful fix, awaiting callback function * better formatting, abstract out wiki search for image * fix construction progress * more formatting for construction embed fix an await in a loop Merge branch 'morefixes'
No description provided.