# \[APPROVED\] Malarne - discord\_cogs

**URL:** <https://cogboard.discord.red/t/approved-malarne-discord-cogs/242>\
**Category:** Applications\
**Created:** [January 18, 2019, 10:04pm UTC](https://cogboard.discord.red/t/approved-malarne-discord-cogs/242 "2019-01-18T22:04:00Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Malarne](https://i.gyazo.com/216ed9bcffb126e83dd3182a8a20d7e0.png) [@Malarne](https://cogboard.discord.red/u/Malarne)\
**Post date:** [January 18, 2019, 10:04pm UTC](https://cogboard.discord.red/t/approved-malarne-discord-cogs/242/1 "2019-01-18T22:04:00Z")

</div>

**Discord Name:**  
Malarne#1418

**GitHub Repository (Must be V3):**

> **[Malarne/discord\_cogs](https://github.com/Malarne/discord_cogs)**
>
> Contribute to Malarne/discord\_cogs development by creating an account on GitHub.

**Description:**  
Miscellaneous cogs.

Now in english by default o/

Boobs: v3 update of the oboobs cog  
League: League of legend cog, displaying infos like game players’elo, top masteries of an account, game history (slow, need an update) using the Neeko Python API (made by myself, unpublished now)  
Leveler: A totally new Leveler for v3. Customizable `[p]profile` (background, note), and a lot of features !  
Note: you can put the cog in french ! Use `[p]set locale fr-FR`  
Note2: by default, whitelist is enabled, check out `[p]levelerset channel whitelist` to toggle it on/off 🙂

---

<div class="post-metadata">

**Author:** ![Redjumpman](https://cogboard.discord.red/user_avatar/cogboard.discord.red/redjumpman/32/11_2.png) [@Redjumpman](https://cogboard.discord.red/u/Redjumpman)\
**Post date:** [January 18, 2019, 11:15pm UTC](https://cogboard.discord.red/t/approved-malarne-discord-cogs/242/2 "2019-01-18T23:15:01Z")

</div>

Assigned @Redjumpman on January 18, 2019, 11:15pm UTC



---

<div class="post-metadata">

**Author:** ![Redjumpman](https://cogboard.discord.red/user_avatar/cogboard.discord.red/redjumpman/32/11_2.png) [@Redjumpman](https://cogboard.discord.red/u/Redjumpman)\
**Post date:** [January 29, 2019, 5:47pm UTC](https://cogboard.discord.red/t/approved-malarne-discord-cogs/242/3 "2019-01-29T17:47:21Z")

</div>

Thank you for resubmitting. I have conducted a preliminary review of your application, with a more thorough review to follow. These are a few minor things I thought you could work on, until I finish my final review. Let me know if you have any questions.

**Main Level**

- Info.json author key contains an incorrect value, should be a list of strings.
- all keys should be lower case in your info.json file.

**Boobs**

- Missing an info.json file
- Make sure to include in that info.json that this cog is NSFW
- Remove instances of `pass_context=True`, this is default now.
- You have a lot of variation in the naming scheme here: Boobs (folder), oboobs (filename), OboobsC(class name).  
Those need to all be the same name, (class will be CamelCase) to provide consistency in reloading and calling help.

**League**

- class League needs a docstring
- game command is missing a docstring
- author key in your info.json file contains an incorrect value. It should be a list of strings.

**Leveler**

- info.json file has an incorrect value for author. It should be a list of strings.
- Main class, `Leveler` is missing a doc string.
- `blacklist toggle` command is missing a docstring

---

<div class="post-metadata">

**Author:** ![Malarne](https://i.gyazo.com/216ed9bcffb126e83dd3182a8a20d7e0.png) [@Malarne](https://cogboard.discord.red/u/Malarne)\
**Post date:** [January 29, 2019, 8:28pm UTC](https://cogboard.discord.red/t/approved-malarne-discord-cogs/242/4 "2019-01-29T20:28:03Z")

</div>

I just made all those little changes to the related cogs  
Thanks for your time 🙂

---

<div class="post-metadata">

**Author:** ![Redjumpman](https://cogboard.discord.red/user_avatar/cogboard.discord.red/redjumpman/32/11_2.png) [@Redjumpman](https://cogboard.discord.red/u/Redjumpman)\
**Post date:** [February 15, 2019, 4:46pm UTC](https://cogboard.discord.red/t/approved-malarne-discord-cogs/242/5 "2019-02-15T16:46:04Z")

</div>

Sorry for the wait, here is my final review:

## League Cog

- In your neeko module (why was this called neeko?) You are generating multiple sessions per request. I suggest looking at the [aiohttp docs](https://aiohttp.readthedocs.io/en/stable/client_quickstart.html#make-a-request) for more information on this issue. The code will look something like this:

```auto
def __init__ (self, *args, **kwargs): 
        self._session = aiohttp.ClientSession()

# Closes the session when the cog is unloaded.
def __unload(self):
    asyncio.get_event_loop().create_task(self._session.close())

```

- You need to provide the user a better way of setting an API key for this cog. requiring the user to edit the cog to hard-code their API is very inconvenient. I suggest creating a command to set the API key.

## oboobs

Same thing here as with the League cog. You should be reusing your session instead of creating one every time you make a request.

## Leveler

- Your font should be in a data folder, which is accessed through Red’s `bundled_data`. The statement `from . import __path__ ` will then be unnecessary.

- It looks like you need to really lint this cog. You aren’t even using the following imports:  
`mod, cog_data_path, namedtuple, urllib, randint`

- On line 319, The following line: `if not grade in message.author.roles:` should be rewritten as  
`if grade not in message.author.roles:` otherwise there is a bug.

- You should also probably be reusing the session here as well for `get_avatar`, since these should all be pointing to a discord link, but you can leave backgrounds as is, since the link could be pointing anywhere.

Let me know when you have fixed these issues and I’ll test it out. Assuming I don’t run into a bugs from running the commands after these changes, you will be approved!

---

<div class="post-metadata">

**Author:** ![Malarne](https://i.gyazo.com/216ed9bcffb126e83dd3182a8a20d7e0.png) [@Malarne](https://cogboard.discord.red/u/Malarne)\
**Post date:** [February 19, 2019, 12:12am UTC](https://cogboard.discord.red/t/approved-malarne-discord-cogs/242/6 "2019-02-19T00:12:12Z")

</div>

If i didn’t forget anything, everything should be fixed.  
Just a little point for League cog, as long as it is now broken due to recent api changes, i still made the changes and checked if it was working using some debugs, the api key works fine, i just don’t really know for requests, but it should be okay, and if there’s something wrong i’ll just fix it when i’ll take the time to update it (which should be really soon ^^ )

---

<div class="post-metadata">

**Author:** ![Galaxy](https://i.gyazo.com/216ed9bcffb126e83dd3182a8a20d7e0.png) [@Galaxy](https://cogboard.discord.red/u/Galaxy)\
**Post date:** [February 20, 2019, 1:25pm UTC](https://cogboard.discord.red/t/approved-malarne-discord-cogs/242/7 "2019-02-20T13:25:13Z")

</div>

It appears that the data folder for the `Leveler` cog is missing from your repo.

---

<div class="post-metadata">

**Author:** ![Malarne](https://i.gyazo.com/216ed9bcffb126e83dd3182a8a20d7e0.png) [@Malarne](https://cogboard.discord.red/u/Malarne)\
**Post date:** [February 20, 2019, 6:20pm UTC](https://cogboard.discord.red/t/approved-malarne-discord-cogs/242/8 "2019-02-20T18:20:01Z")

</div>

fixed that, thanks ^^

---

<div class="post-metadata">

**Author:** ![Redjumpman](https://cogboard.discord.red/user_avatar/cogboard.discord.red/redjumpman/32/11_2.png) [@Redjumpman](https://cogboard.discord.red/u/Redjumpman)\
**Post date:** [February 25, 2019, 12:08am UTC](https://cogboard.discord.red/t/approved-malarne-discord-cogs/242/9 "2019-02-25T00:08:27Z")

</div>

After looking through your commit history and reviewing your updates, I am approving this application. Congratulations! I will be locking this thread from this point on. If you have any questions please feel free to contact me on discord, or send a message to the QA group on CogBoard. Please note that it may take up to 24 hours for all cog creator benefits to be visible.

---

<div class="post-metadata">

**Author:** ![Redjumpman](https://cogboard.discord.red/user_avatar/cogboard.discord.red/redjumpman/32/11_2.png) [@Redjumpman](https://cogboard.discord.red/u/Redjumpman)\
**Post date:** [February 25, 2019, 12:08am UTC](https://cogboard.discord.red/t/approved-malarne-discord-cogs/242/10 "2019-02-25T00:08:36Z")

</div>

Closed on February 25, 2019, 12:08am UTC



---

<div class="post-metadata">

**Author:** ![TrustyJAID](https://cogboard.discord.red/user_avatar/cogboard.discord.red/trustyjaid/32/55_2.png) [@TrustyJAID](https://cogboard.discord.red/u/TrustyJAID)\
**Post date:** [September 30, 2021, 6:07pm UTC](https://cogboard.discord.red/t/approved-malarne-discord-cogs/242/11 "2021-09-30T18:07:04Z")

</div>

Unassigned @Redjumpman on September 30, 2021, 6:07pm UTC


