How to use the playsound.utils.chat_formatting.info function in playsound

To help you get started, we’ve selected a few playsound examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github tmercswims / tmerc-cogs / playsound / playsound.py View on Github external
await self.bot.reply(
                cf.error("A sound with that filename already exists."
                         " Please change the filename and try again."))
            return

        async with aiohttp.get(url) as new_sound:
            f = open(filepath, "wb")
            f.write(await new_sound.read())
            f.close()

        self.settings[server.id][
            os.path.splitext(filename)[0]] = {"volume": default_volume}
        dataIO.save_json(self.settings_path, self.settings)

        await self.bot.reply(
            cf.info("Sound {} added.".format(os.path.splitext(filename)[0])))