Xithrius / Xythrion-legacy

Graphing manipulated data in Discord.
MIT License
11 stars 3 forks source link

feature/add source command #10

Closed fisher60 closed 4 years ago

fisher60 commented 4 years ago

Summary

This command links to the code of a command if it can be found. The embed could use a little work as it returns an empty description, this description shoul dbe the of a command. There is a known issue with the embed where entering an invalid cog name raises an exception, that exception escapes the markdown in the embed, it is mildly annoying.

Usage

\source to get the generic repo or \source [command] to get the cog source image

Needs fixing

Missing description (this attempts to get the command brief) image

Closes: #8

Xithrius commented 4 years ago

Please change the imports within this extension to match the rest within this repository to keep it consistent.

Example: from discord.ext.commands import Cog instead of from discord.ext import commands and then commands.Cog sometime later.

Edit: I see why it's from discord.ext import commands. To keep it shorter, just do from discord.ext import commands as comms.