[V3 General] Changed urban dictionary for my embed version #1871

Merged
lionirdeadman merged 9 commits from V3/develop into V3/develop 2018-08-07 08:33:40 +02:00
lionirdeadman commented 2018-06-15 23:32:56 +02:00 (Migrated from github.com)

Type

  • Bugfix
  • Enhancement
  • New feature

Description of the changes

Replaced the old urban dictionary command to an embed version I made which adds:

  • The author name
  • Thumb ups
  • Thumb downs
  • Reaction menu to see the different definitions
### Type - [ ] Bugfix - [x] Enhancement - [x] New feature ### Description of the changes Replaced the old urban dictionary command to an embed version I made which adds: - The author name - Thumb ups - Thumb downs - Reaction menu to see the different definitions
palmtree5 (Migrated from github.com) reviewed 2018-06-15 23:32:56 +02:00
tekulvw (Migrated from github.com) reviewed 2018-06-15 23:32:56 +02:00
lionirdeadman commented 2018-06-26 05:48:48 +02:00 (Migrated from github.com)

I'll update my branch (to include the changes made to V3/develop) after the code is reviewed if you don't mind.

I don't really want to update this branch all the time while I wait for review, hope you understand.

I'll update my branch (to include the changes made to V3/develop) after the code is reviewed if you don't mind. I don't really want to update this branch all the time while I wait for review, hope you understand.
Tobotimus (Migrated from github.com) requested changes 2018-06-28 15:17:31 +02:00
Tobotimus (Migrated from github.com) left a comment

Hi, thanks for your contribution! 🎉

I like the new menu interface, much better than the old one! However there are a couple things which need to be changed in your code before we'll accept this 😃

Once you've made the changes, please post a comment to let us know.

Hi, thanks for your contribution! :tada: I like the new menu interface, much better than the old one! However there are a couple things which need to be changed in your code before we'll accept this :smiley: Once you've made the changes, please post a comment to let us know.
@ -224,49 +223,89 @@ class General:
await ctx.send(_("I need the `Embed links` permission to send this."))
Tobotimus (Migrated from github.com) commented 2018-06-28 15:10:05 +02:00

This help string is a bit long. Try to make the first line shorter than 72 characters, but the user should still know exactly what the command does from that line. Any further detail should be expanded after two line-breaks.

This help string is a bit long. Try to make the first line shorter than 72 characters, but the user should still know exactly what the command does from that line. Any further detail should be expanded after two line-breaks.
Tobotimus (Migrated from github.com) commented 2018-06-28 15:11:06 +02:00

Early declaration of variable here is unnecessary

Early declaration of variable here is unnecessary
Tobotimus (Migrated from github.com) commented 2018-06-28 15:11:18 +02:00

You'll want to return here

You'll want to return here
Tobotimus (Migrated from github.com) commented 2018-06-28 15:12:43 +02:00

Please use "".format() instead of concatenating strings, and also add back in the i18n call (which is surrounding the string with _()).

Please use `"".format()` instead of concatenating strings, and also add back in the i18n call (which is surrounding the string with `_()`).
Tobotimus (Migrated from github.com) commented 2018-06-28 15:13:23 +02:00

Also, this sentence isn't quite grammatically correct, and needs to be wrapped in _()

Also, this sentence isn't quite grammatically correct, and needs to be wrapped in `_()`
Tobotimus (Migrated from github.com) commented 2018-06-28 15:13:58 +02:00

Please use "".format() here too

Please use `"".format()` here too
lionirdeadman commented 2018-06-28 21:49:56 +02:00 (Migrated from github.com)

I think I've changed everything you asked for. Thanks for the review. :)

Could it be in Beta 17 or is it feature-freezed? 🤔

I think I've changed everything you asked for. Thanks for the review. :) Could it be in Beta 17 or is it feature-freezed? :thinking:
lionirdeadman commented 2018-06-28 22:41:03 +02:00 (Migrated from github.com)

Had to come up with a fix for the 2048 character limit of descriptions, I hadn't thought of it.

Everything should be good now though.

Had to come up with a fix for the 2048 character limit of descriptions, I hadn't thought of it. Everything should be good now though.
lionirdeadman commented 2018-07-22 22:39:24 +02:00 (Migrated from github.com)

Just commenting again since this is supposed to be for B18 according to the tag so I'd like a review again. Thank you.

Just commenting again since this is supposed to be for B18 according to the tag so I'd like a review again. Thank you.
Kowlin commented 2018-07-25 02:48:50 +02:00 (Migrated from github.com)

I'm going to place this on hold to review with other core developers. See what they think.

I'm going to place this on hold to review with other core developers. See what they think.
mikeshardmind commented 2018-07-25 06:55:19 +02:00 (Migrated from github.com)

This is sleek, and I like it a lot. The only problem I have with it is that it does not respect the core embed requested setting. It might be better to break this out into 2 separate functions, (old code and new) and have the appropriate one based on that setting called when the command is invoked.

This is sleek, and I like it a lot. The only problem I have with it is that it does not respect the core embed requested setting. It might be better to break this out into 2 separate functions, (old code and new) and have the appropriate one based on that setting called when the command is invoked.
lionirdeadman commented 2018-07-27 18:51:27 +02:00 (Migrated from github.com)

I don't know how to respect the embed setting, if you could give me pointers, I'd be glad to do it, @mikeshardmind.

Feel free to PM me in Discord instead of commenting here so we can do this faster! 😄

I don't know how to respect the embed setting, if you could give me pointers, I'd be glad to do it, @mikeshardmind. Feel free to PM me in Discord instead of commenting here so we can do this faster! :smile:
mikeshardmind commented 2018-07-28 00:52:28 +02:00 (Migrated from github.com)

There's a helper method in context for this since this particular command always should respond in the same location it was called from.

if await ctx.embed_requested():
    #  output version using an embed
else:
    #  output version without an embed
There's a helper method in [context ](https://github.com/Cog-Creators/Red-DiscordBot/blob/e3bff7e87cfca23dd36bf92507a99636d7033171/redbot/core/commands/context.py#L160)for this since this particular command always should respond in the same location it was called from. ```py if await ctx.embed_requested(): # output version using an embed else: # output version without an embed ```
lionirdeadman commented 2018-07-30 02:35:56 +02:00 (Migrated from github.com)

I think I did it properly so this should be done now! (sorry for the wait, I was a bit busy)

I think I did it properly so this should be done now! (sorry for the wait, I was a bit busy)
mikeshardmind commented 2018-07-30 03:57:33 +02:00 (Migrated from github.com)

Looks solid. 👍

Looks solid. :+1:
Tobotimus (Migrated from github.com) approved these changes 2018-08-07 07:52:58 +02:00
Tobotimus (Migrated from github.com) left a comment

Alright, thanks @lionirdeadman for the PR and thanks @mikeshardmind for reviewing. This has really jazzed up the urban command.

A small word of advice @lionirdeadman for any future PR's, try not to change too much code unnecessarily. This command has essentially been rewritten from the ground up when looking at the diff - but in retrospect it only aimed to change the output format (not any HTTP request / backend stuff). Changing more than necessary gives the reviewers more work than necessary, hence why this has taken almost 2 months to be merged! However I'll let it slide and I hope you're glad this has finally had its green button pressed :)

Alright, thanks @lionirdeadman for the PR and thanks @mikeshardmind for reviewing. This has really jazzed up the urban command. A small word of advice @lionirdeadman for any future PR's, try not to change *too much* code unnecessarily. This command has essentially been rewritten from the ground up when looking at the diff - but in retrospect it only aimed to change the output format (not any HTTP request / backend stuff). Changing more than necessary gives the reviewers more work than necessary, hence why this has taken almost 2 months to be merged! However I'll let it slide and I hope you're glad this has finally had its green button pressed :)
lionirdeadman commented 2018-08-10 05:24:13 +02:00 (Migrated from github.com)

I had already made that code in a cog, I simply modified it slightly for this PR. I'll try not to do that again though if that makes things harder for you guys.

And yeah, I'm pretty happy it got merged. ^^

I had already made that code in a cog, I simply modified it slightly for this PR. I'll try not to do that again though if that makes things harder for you guys. And yeah, I'm pretty happy it got merged. ^^
Sign in to join this conversation.
No labels
Automated PR
Blocked
Blocked By: Damage Control
Blocked By: Dependency
Blocked By: Other PR
Breaking Change
Category: CI
Category: Cogs - Admin
Category: Cogs - Alias
Category: Cogs - Audio
Category: Cogs - Bank
Category: Cogs - Cleanup
Category: Cogs - CustomCommands
Category: Cogs - Dev
Category: Cogs - Downloader
Category: Cogs - Economy
Category: Cogs - Filter
Category: Cogs - General
Category: Cogs - Image
Category: Cogs - Mod
Category: Cogs - Modlog
Category: Cogs - Mutes
Category: Cogs - Permissions
Category: Cogs - Reports
Category: Cogs - Streams
Category: Cogs - Trivia
Category: Cogs - Trivia - Lists
Category: Cogs - Warnings
Category: Core - API - App Commands Package
Category: Core - API - Audio
Category: Core - API - Bank
Category: Core - API - Commands Package
Category: Core - API - Config
Category: Core - API - Other
Category: Core - API - Utils Package
Category: Core - Bot Class
Category: Core - Bot Commands
Category: Core - Command-line Interfaces
Category: Core - Downloader
Category: Core - Help
Category: Core - i18n
Category: Core - Modlog
Category: Core - Other Internals
Category: Core - RPC/ZMQ
Category: Docker
Category: Docs - Changelogs
Category: Docs - For Developers
Category: Docs - Install Guides
Category: Docs - Other
Category: Docs - User Guides
Category: Meta
Category: RPC/ZMQ methods
Category: Vendored Packages
Changelog Entry: Added
Changelog Entry: Pending
Changelog Entry: Skipped
Closed: Duplicate
Closed: External
Closed: Invalid
Closed: User Error
Closed: Won't Fix
Complex Issue
Docs-only
Feature Branch
Good First Issue
Help Wanted
High Priority
Needs Backport To stable-docs
No Activity
No Repro
QA: Bypassed
QA: Changes Requested
QA: Passed
Release Blocker
Status: Accepted
Status: Frozen
Status: In Progress
Status: Needs Discussion
Status: Needs Info
Status: Needs Triage
Status: PRs Welcome
Type: Bug
Type: Dependency Update
Type: Deprecation
Type: Enhancement
Type: Feature
Type: Informational
Type: Merge
Type: Optimisation
Type: Question
Type: Removal
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Mrcoolgamer11/Red-DiscordBot!1871
No description provided.