Commit d6fe3ab8 authored by Jeremy Pallats's avatar Jeremy Pallats 💬
Browse files

FIX: Donate command should use aiofiles and abs path.

parent e60030a8
Loading
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -801,8 +801,10 @@ class Donate(Action):
    Information on how to donate. Command will not actually process anything here.
    """
    async def execute(self):
        with open(cog.util.CONF.paths.donate, 'r', encoding='utf-8') as fin:
            await self.bot.send_message(self.msg.channel, fin.read())
        text_path = cog.util.rel_to_abs(cog.util.CONF.paths.donate)
        async with aiofiles.open(text_path, 'r', encoding='utf-8') as fin:
            content = await fin.read()
            await self.bot.send_message(self.msg.channel, content)


class Drop(Action):