PyDrocsid / cogs

The official cog library used by PyDrocsid bots
GNU General Public License v3.0
13 stars 5 forks source link

Allow subreddit prefix #127

Closed Defelo closed 2 years ago

Defelo commented 2 years ago

Allow usage of the /r/ prefix for subreddits in .reddit + and .reddit -.

umairkarel commented 2 years ago

In which file we have make changes?

Defelo commented 2 years ago

In which file we have make changes?

https://github.com/PyDrocsid/cogs/blob/develop/integrations/reddit/cog.py

umairkarel commented 2 years ago

Actually, I am not getting what changes we have to do?

Defelo commented 2 years ago

The function get_subreddit_name in line 38 takes the name of a subreddit and returns its display name. What should be changed is that if the parameter starts with the /r/ or r/ prefix, this prefix should be removed before putting it into the url in line 41.

umairkarel commented 2 years ago

Got it. I would like to do it. Please assign me this task.