Merge branch 'develop' of https://github.com/Twentysix26/Red-DiscordBot into develop

This commit is contained in:
Emil Hammarstrom 2016-02-08 09:46:56 +01:00
commit b4c238e541
4 changed files with 6 additions and 17 deletions

View File

@ -3,16 +3,4 @@
This is a work in progress. Bugs and missing features are to be expected. This is a work in progress. Bugs and missing features are to be expected.
The only requirement for the main part is: ####[ [How to try it out](https://github.com/Twentysix26/Red-DiscordBot/wiki/Red-v2) ]
```
pip3 install git+https://github.com/Rapptz/discord.py@async
```
The requirements for the audio module are:
```
pip3 install youtube_dl
pip3 install beautifulsoup4
Opus/ffmpeg
```
Either you install ffmpeg and opus from the original sources or you can download them directly from the [main branch](https://github.com/Twentysix26/Red-DiscordBot).
Just click on the 3 .exes and the opus dll, then click on the "raw" button to download them.
If you do this, you also need to put them in the main folder, next to red.py

View File

@ -248,7 +248,7 @@ class Audio:
if await self.check_voice(ctx.message.author, ctx.message): if await self.check_voice(ctx.message.author, ctx.message):
if not self.playlist: if not self.playlist:
self.queue.append(link) self.queue.append(link)
await self.bot.say(self.queue) await self.bot.say("Link added to queue.")
else: else:
await self.bot.say("I'm already playing a playlist.") await self.bot.say("I'm already playing a playlist.")

View File

@ -83,7 +83,7 @@ class TriviaSession():
if self.questionList: await self.newQuestion() if self.questionList: await self.newQuestion()
else: else:
if os.path.isfile("data/trivia/" + qlist + ".txt"): if os.path.isfile("data/trivia/" + qlist + ".txt"):
self.questionList = self.loadList("trivia/" + qlist + ".txt") self.questionList = self.loadList("data/trivia/" + qlist + ".txt")
self.status = "new question" self.status = "new question"
self.timeout = time.perf_counter() self.timeout = time.perf_counter()
if self.questionList: await self.newQuestion() if self.questionList: await self.newQuestion()

3
red.py
View File

@ -23,7 +23,7 @@ description = """
Red - A multifunction Discord bot by Twentysix Red - A multifunction Discord bot by Twentysix
""" """
formatter = commands.HelpFormatter(show_check_failure=True) formatter = commands.HelpFormatter(show_check_failure=False)
bot = commands.Bot(command_prefix=["_"], formatter=formatter, bot = commands.Bot(command_prefix=["_"], formatter=formatter,
description=description, pm_help=True) description=description, pm_help=True)
@ -221,6 +221,7 @@ def list_cogs():
cogs = glob.glob("cogs/*.py") cogs = glob.glob("cogs/*.py")
clean = [] clean = []
for c in cogs: for c in cogs:
c = c.replace("/", "\\") # Linux fix
clean.append("cogs." + c.split("\\")[1].replace(".py", "")) clean.append("cogs." + c.split("\\")[1].replace(".py", ""))
return clean return clean