mirror of https://github.com/miaowware/qrm2.git
make ?xkcd only accept ints as arg (#379)
fixes #376 * Update CHANGELOG.md Co-authored-by: 0x5c <dev@0x5c.io>
This commit is contained in:
parent
bb3ee319b6
commit
1cb7ef5861
|
@ -8,6 +8,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||||
### Added
|
### Added
|
||||||
- `?tex` command to render a LaTeX expression.
|
- `?tex` command to render a LaTeX expression.
|
||||||
- Configuration option to use another rTeX instance for `?tex`.
|
- Configuration option to use another rTeX instance for `?tex`.
|
||||||
|
### Fixed
|
||||||
|
- Lack of input sanitisation in `?xkcd`.
|
||||||
|
|
||||||
|
|
||||||
## [2.6.0] - 2021-03-18
|
## [2.6.0] - 2021-03-18
|
||||||
|
|
|
@ -27,9 +27,9 @@ class FunCog(commands.Cog):
|
||||||
self.words = words_file.read().lower().splitlines()
|
self.words = words_file.read().lower().splitlines()
|
||||||
|
|
||||||
@commands.command(name="xkcd", aliases=["x"], category=cmn.cat.fun)
|
@commands.command(name="xkcd", aliases=["x"], category=cmn.cat.fun)
|
||||||
async def _xkcd(self, ctx: commands.Context, number: str):
|
async def _xkcd(self, ctx: commands.Context, number: int):
|
||||||
"""Looks up an xkcd comic by number."""
|
"""Looks up an xkcd comic by number."""
|
||||||
await ctx.send("http://xkcd.com/" + number)
|
await ctx.send("http://xkcd.com/" + str(number))
|
||||||
|
|
||||||
@commands.command(name="tar", category=cmn.cat.fun)
|
@commands.command(name="tar", category=cmn.cat.fun)
|
||||||
async def _tar(self, ctx: commands.Context):
|
async def _tar(self, ctx: commands.Context):
|
||||||
|
|
Loading…
Reference in New Issue