-
-
Notifications
You must be signed in to change notification settings - Fork 224
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
E621 Command #93
E621 Command #93
Conversation
why is furry a label smh |
why the fuck do we have a furry label? |
@pedrofracassi why tf you don't test this shit and approve it? |
@Doges cause I'm working on a school project. |
src/commands/furry/e621.js
Outdated
embed.setDescription(`**Usage:** ${process.env.PREFIX}${this.name}`) | ||
message.channel.send(embed) | ||
} | ||
message.channel.stopTyping() |
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.
message.channel.send(embed).then(() => message.channel.stopTyping())
to remove duped code (lines 21 and 28)
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.
and use async/await
src/commands/furry/e621.js
Outdated
for (let image of images) { | ||
embed.setImage(image.common.file_url) | ||
embed.setDescription('Here\'s your yiff!') | ||
message.channel.send(embed).then(message => message.channel.stopTyping()) |
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.
remove this line
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 21
src/commands/furry/e621.js
Outdated
embed.setColor(Constants.ERROR_COLOR) | ||
embed.setTitle('You need to use this command in a NSFW channel') | ||
embed.setDescription(`**Usage:** ${process.env.PREFIX}${this.name}`) | ||
message.channel.send(embed).then(message => message.channel.stopTyping()) |
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.
remove this line
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.
WHICH LINE
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.
28
src/commands/furry/e621.js
Outdated
embed.setTitle('You need to use this command in a NSFW channel') | ||
embed.setDescription(`**Usage:** ${process.env.PREFIX}${this.name}`) | ||
message.channel.send(embed).then(message => message.channel.stopTyping()) | ||
} |
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.
add message.channel.send(embed).then(() => message.channel.stopTyping())
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.
but wait, if i remove the line, the embed don't gonna send in normal 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.
insert at the end of the if else case
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.
use async/await
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.
not needed, already solved 🤔
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.
LGTM
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.
This isn't going to work without await, the message will be sent before the api call.
src/commands/furry/e621.js
Outdated
if (message.channel.nsfw) { | ||
booru.search('e621.net', ['rating:e'], {limit: 1, random: true}) | ||
.then(booru.commonfy) | ||
.then(images => { |
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.
const images = await booru.search('e621.net', ['rating:e'], {limit: 1, random: true}).then(booru.commonfy)```
fuck |
ooooo snap |
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.
LGTM
remaking the command |
haha @pedrofracassi i did it
Closes #78