mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-07 19:58:54 -05:00
Merge remote-tracking branch 'upstream/develop' into develop
This commit is contained in:
commit
4a274d178a
@ -391,7 +391,10 @@ class Audio:
|
|||||||
def empty_cache(self):
|
def empty_cache(self):
|
||||||
files = os.listdir("data/audio/cache")
|
files = os.listdir("data/audio/cache")
|
||||||
for f in files:
|
for f in files:
|
||||||
|
try:
|
||||||
os.unlink("data/audio/cache/" + f)
|
os.unlink("data/audio/cache/" + f)
|
||||||
|
except PermissionError: # In case it tries to delete the file that it's currently playing
|
||||||
|
pass
|
||||||
|
|
||||||
def cache_size(self):
|
def cache_size(self):
|
||||||
total = [os.path.getsize("data/audio/cache/" + f) for f in os.listdir("data/audio/cache")]
|
total = [os.path.getsize("data/audio/cache/" + f) for f in os.listdir("data/audio/cache")]
|
||||||
|
|||||||
@ -71,7 +71,7 @@ class Economy:
|
|||||||
self.add_money(id, self.settings["PAYDAY_CREDITS"])
|
self.add_money(id, self.settings["PAYDAY_CREDITS"])
|
||||||
await self.bot.say("{} `Here, take some credits. Enjoy! (+{} credits!)`".format(author.mention, str(self.settings["PAYDAY_CREDITS"])))
|
await self.bot.say("{} `Here, take some credits. Enjoy! (+{} credits!)`".format(author.mention, str(self.settings["PAYDAY_CREDITS"])))
|
||||||
else:
|
else:
|
||||||
await self.bot.say("{} `You need an account to receive credits. (!economy)`".format(author.mention))
|
await self.bot.say("{} `You need an account to receive credits.`".format(author.mention))
|
||||||
|
|
||||||
@commands.command(pass_context=True)
|
@commands.command(pass_context=True)
|
||||||
async def payouts(self, ctx):
|
async def payouts(self, ctx):
|
||||||
|
|||||||
@ -106,7 +106,7 @@ class General:
|
|||||||
"""
|
"""
|
||||||
question = " ".join(question)
|
question = " ".join(question)
|
||||||
if question.endswith("?") and question != "?":
|
if question.endswith("?") and question != "?":
|
||||||
return await self.bot.say("```" + randchoice(self.ball) + "```")
|
return await self.bot.say("`" + randchoice(self.ball) + "`")
|
||||||
else:
|
else:
|
||||||
return await self.bot.say("That doesn't look like a question.")
|
return await self.bot.say("That doesn't look like a question.")
|
||||||
|
|
||||||
@ -200,9 +200,9 @@ class General:
|
|||||||
"""Starts/stops a poll
|
"""Starts/stops a poll
|
||||||
|
|
||||||
Usage example:
|
Usage example:
|
||||||
poll Is this a poll?;Yes;No;Maybe"""
|
poll Is this a poll?;Yes;No;Maybe
|
||||||
|
poll stop"""
|
||||||
message = ctx.message
|
message = ctx.message
|
||||||
print(text)
|
|
||||||
if len(text) == 1:
|
if len(text) == 1:
|
||||||
if text[0].lower() == "stop":
|
if text[0].lower() == "stop":
|
||||||
await self.endpoll(message)
|
await self.endpoll(message)
|
||||||
|
|||||||
@ -1,2 +1,3 @@
|
|||||||
|
chcp 65001
|
||||||
python red.py
|
python red.py
|
||||||
pause
|
pause
|
||||||
@ -1,4 +1,5 @@
|
|||||||
@Echo off
|
@Echo off
|
||||||
|
chcp 65001
|
||||||
:Start
|
:Start
|
||||||
|
|
||||||
python red.py
|
python red.py
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user