Merge branch 'master' of https://github.com/Phxntxm/Bonfire
This commit is contained in:
commit
9d15cc0bc8
12
README.md
12
README.md
|
@ -5,7 +5,7 @@ This is for a Discord bot using the discord.py wrapper made for fun, used in a c
|
|||
If you'd like to add this bot to one of your own servers, please visit the following URL:
|
||||
https://discordapp.com/oauth2/authorize?client_id=183748889814237186&scope=bot&permissions=0
|
||||
|
||||
This requires the discord.py library, as well as all of it's dependencies.
|
||||
This requires the discord.py library, as well as all of its dependencies.
|
||||
https://github.com/Rapptz/discord.py
|
||||
|
||||
To save the data for the bot, rethinkdb is what is used:
|
||||
|
@ -20,6 +20,14 @@ py -3 -m pip install discord.py[voice] lxml fuzzywuzzy youtube_dl rethinkdb ruam
|
|||
|
||||
Note: ATM of writing this, Pillow 3.4.2 (the stable version...good job Pillow?) is broken, do not use pip's default to install this. This is why we're using Pillow==3.4.1 above, and not just Pillow
|
||||
|
||||
The joke command requires the fortune-mod package, which are installable on Linux and other Unix-based distros.
|
||||
|
||||
Debian, Ubuntu, etc.:
|
||||
```
|
||||
sudo apt install fortune-mod
|
||||
```
|
||||
If you're on Red Hat, Fedora, etc., replace ``apt`` with ``yum``. If you're on another Linux distro, I trust you know what package manager to use. If you're on Windows, you might want to check out [this guide](http://superuser.com/questions/683162/bsd-fortune-for-windows-command-prompt-or-dos), but you're on your own.
|
||||
|
||||
The only required file to modify would be the config.yml.sample file. The entries are as follows:
|
||||
|
||||
- bot_token: The token that can be retrieved from the [bot's application page](https://discordapp.com/developers/applications/me)
|
||||
|
@ -36,6 +44,6 @@ The only required file to modify would be the config.yml.sample file. The entrie
|
|||
- da_secret: The deviant art Secret, given with the da_id above
|
||||
- shard_count: This is the number of shards the bot is split over. 1 needs to be used if the bot is not being sharded
|
||||
- shard_id: This will be the ID of the shard in particular, 0 if sharding is not used
|
||||
- extensions: This is a list of the extensions loaded into the bot (check the cogs folder for the extensions available). The disabled playlist is a special entry....read that file for what it's purpose is....most likely you will not need it. Entries in this list need to be separated by ", " like in the example.
|
||||
- extensions: This is a list of the extensions loaded into the bot (check the cogs folder for the extensions available). The disabled playlist is a special entry....read that file for what its purpose is....most likely you will not need it. Entries in this list need to be separated by ", " like in the example.
|
||||
- db_*: This is the information for the rethinkdb database. The cert is the certificate used for driver connections
|
||||
|
||||
|
|
|
@ -384,8 +384,9 @@ class Mod:
|
|||
try:
|
||||
await self.bot.purge_from(ctx.message.channel, limit=limit)
|
||||
except discord.HTTPException:
|
||||
await self.bot.send_message(ctx.message.channel, "Detected messages that are too far back for me to delete;" \
|
||||
" I can only bulk delete messages that are under 14 days old.")
|
||||
await self.bot.send_message(ctx.message.channel, "Detected messages that are too far "
|
||||
"back for me to delete; I can only bulk delete messages"
|
||||
" that are under 14 days old.")
|
||||
|
||||
@commands.command(pass_context=True, no_pm=True)
|
||||
@utils.custom_perms(manage_messages=True)
|
||||
|
|
|
@ -384,7 +384,8 @@ class Music:
|
|||
except discord.InvalidArgument:
|
||||
await self.bot.say('This is not a voice channel...')
|
||||
except (asyncio.TimeoutError, discord.ConnectionClosed):
|
||||
await self.bot.say("I failed to connect! This can sometimes be caused by your server region being far away."
|
||||
await self.bot.say("I failed to connect! This usually happens if I don't have permission to join the"
|
||||
" channel, but can sometimes be caused by your server region being far away."
|
||||
" Otherwise this is an issue on Discord's end, causing the connect to timeout!")
|
||||
await self.remove_voice_client(channel.server)
|
||||
else:
|
||||
|
@ -405,7 +406,8 @@ class Music:
|
|||
try:
|
||||
success = await self.create_voice_client(summoned_channel)
|
||||
except (asyncio.TimeoutError, discord.ConnectionClosed):
|
||||
await self.bot.say("I failed to connect! This can sometimes be caused by your server region being far away."
|
||||
await self.bot.say("I failed to connect! This usually happens if I don't have permission to join the"
|
||||
" channel, but can sometimes be caused by your server region being far away."
|
||||
" Otherwise this is an issue on Discord's end, causing the connect to timeout!")
|
||||
await self.remove_voice_client(summoned_channel.server)
|
||||
return False
|
||||
|
|
|
@ -56,8 +56,12 @@ class Owner:
|
|||
except Exception as e:
|
||||
await self.bot.say(python.format(type(e).__name__ + ': ' + str(e)))
|
||||
return
|
||||
|
||||
await self.bot.say(python.format(result))
|
||||
try:
|
||||
await self.bot.say(python.format(result))
|
||||
except discord.HTTPException:
|
||||
await self.bot.say("Result is too long for me to send")
|
||||
except:
|
||||
pass
|
||||
|
||||
@commands.command(pass_context=True)
|
||||
@commands.check(utils.is_owner)
|
||||
|
|
Loading…
Reference in a new issue