Skip to content
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

Closed
wants to merge 23 commits into from
Closed

E621 Command #93

wants to merge 23 commits into from

Conversation

Doges
Copy link
Member

@Doges Doges commented Jun 5, 2018

haha @pedrofracassi i did it

Closes #78

@Doges Doges added the type: feature New feature label Jun 5, 2018
@Doges Doges self-assigned this Jun 5, 2018
@Doges Doges requested review from pedrofracassi, jaxxibae and a team June 5, 2018 20:42
@Doges Doges added Furry type: feature New feature and removed type: feature New feature labels Jun 5, 2018
@jaxxibae
Copy link
Member

jaxxibae commented Jun 5, 2018

why is furry a label smh

@pedrofracassi
Copy link
Member

why the fuck do we have a furry label?

@pedrofracassi pedrofracassi added scope: commands New command(s) suggestion/addition and removed type: feature New feature Furry labels Jun 5, 2018
@Doges
Copy link
Member Author

Doges commented Jun 6, 2018

@pedrofracassi why tf you don't test this shit and approve it?

@pedrofracassi
Copy link
Member

@Doges cause I'm working on a school project.

embed.setDescription(`**Usage:** ${process.env.PREFIX}${this.name}`)
message.channel.send(embed)
}
message.channel.stopTyping()
Copy link
Member

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)

Copy link
Member

@davipatury davipatury Jun 7, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and use async/await

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())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this line

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line 21

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())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this line

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WHICH LINE

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

28

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())
}
Copy link
Member

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())

Copy link
Member Author

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 🤔

Copy link
Member

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

Copy link
Member

@davipatury davipatury Jun 10, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use async/await

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not needed, already solved 🤔

jaxxibae
jaxxibae previously approved these changes Jun 9, 2018
Copy link
Member

@jaxxibae jaxxibae left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@davipatury davipatury left a 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.

if (message.channel.nsfw) {
booru.search('e621.net', ['rating:e'], {limit: 1, random: true})
.then(booru.commonfy)
.then(images => {
Copy link
Member

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)```

@Doges
Copy link
Member Author

Doges commented Jun 12, 2018

fuck

@jaxxibae
Copy link
Member

ooooo snap

davipatury
davipatury previously approved these changes Jun 13, 2018
Copy link
Member

@davipatury davipatury left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Doges Doges closed this Jun 15, 2018
@SwitchbladeBot SwitchbladeBot locked as too heated and limited conversation to collaborators Jun 15, 2018
@Doges
Copy link
Member Author

Doges commented Jun 15, 2018

remaking the command

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: commands New command(s) suggestion/addition
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants