mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-12-11 11:52:34 -05:00
Compare commits
29 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
02934a77c6 | ||
|
|
bda46db0cc | ||
|
|
1a25d4291f | ||
|
|
5444da655a | ||
|
|
81929e77a3 | ||
|
|
7d4e5fd390 | ||
|
|
a42c4fb215 | ||
|
|
e874e6aa01 | ||
|
|
bd77fedee3 | ||
|
|
55576546aa | ||
|
|
eb914dc719 | ||
|
|
7cd3ff13bf | ||
|
|
c7becb6d80 | ||
|
|
15bf5c5e1f | ||
|
|
e19328188b | ||
|
|
92376b7de2 | ||
|
|
97b70c35ee | ||
|
|
4f197fd5f9 | ||
|
|
74543e59bf | ||
|
|
7aa9e67bc2 | ||
|
|
2b2491f40f | ||
|
|
30f71c6fe1 | ||
|
|
bd55caea6a | ||
|
|
8b69042f08 | ||
|
|
0dafcfa083 | ||
|
|
b21bb9aeb5 | ||
|
|
fec0e936f6 | ||
|
|
1fa62f331a | ||
|
|
5301a6e2d0 |
25
.github/ISSUE_TEMPLATE.md
vendored
25
.github/ISSUE_TEMPLATE.md
vendored
@@ -1,20 +1,5 @@
|
||||
Please be sure to read through other issues as well to make sure what you are suggesting/reporting has not already
|
||||
been suggested/reported
|
||||
|
||||
### Type:
|
||||
|
||||
- [ ] Suggestion
|
||||
- [ ] Bug
|
||||
|
||||
### Brief description of the problem
|
||||
|
||||
### Expected behavior
|
||||
|
||||
### Actual behavior
|
||||
|
||||
### Steps to reproduce
|
||||
|
||||
1.
|
||||
2.
|
||||
3.
|
||||
4.
|
||||
<!--
|
||||
Please be sure to use the correct template,
|
||||
if your report doesn't have the correct template please open an issue describing your issue in detail
|
||||
For support regarding the bot itself please visit the discord server over at https://discord.gg/red
|
||||
-->
|
||||
|
||||
31
.github/ISSUE_TEMPLATE/command_bug.md
vendored
Normal file
31
.github/ISSUE_TEMPLATE/command_bug.md
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
---
|
||||
name: Bug reports for commands
|
||||
about: For bugs that involve commands found within Red
|
||||
|
||||
---
|
||||
|
||||
# Command bugs
|
||||
|
||||
<!--
|
||||
Did you find a bug with a command? Fill out the following:
|
||||
-->
|
||||
|
||||
#### Command name
|
||||
|
||||
<!-- Replace this line with the name of the command -->
|
||||
|
||||
#### What cog is this command from?
|
||||
|
||||
<!-- Replace this line with the name of the cog -->
|
||||
|
||||
#### What were you expecting to happen?
|
||||
|
||||
<!-- Replace this line with a description of what you were expecting to happen -->
|
||||
|
||||
#### What actually happened?
|
||||
|
||||
<!-- Replace this line with a description of what actually happened. Include any error messages -->
|
||||
|
||||
#### How can we reproduce this issue?
|
||||
|
||||
<!-- Replace with numbered steps to reproduce the issue -->
|
||||
41
.github/ISSUE_TEMPLATE/feature_req.md
vendored
Normal file
41
.github/ISSUE_TEMPLATE/feature_req.md
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: For feature requests regarding Red itself.
|
||||
|
||||
---
|
||||
|
||||
# Feature request
|
||||
|
||||
<!-- This template is for feature requests. Please fill out the following: -->
|
||||
|
||||
|
||||
#### Select the type of feature you are requesting:
|
||||
|
||||
<!-- To check a box, replace the space between the [] with a x -->
|
||||
|
||||
- [ ] Cog
|
||||
- [ ] Command
|
||||
- [ ] API functionality
|
||||
|
||||
#### Describe your requested feature
|
||||
|
||||
<!--
|
||||
Feel free to describe in as much detail as you wish.
|
||||
|
||||
If you are requesting a cog to be included in core:
|
||||
- Describe the functionality in as much detail as possible
|
||||
- Include the command structure, if possible
|
||||
- Please note that unless it's something that should be core functionality,
|
||||
we reserve the right to reject your suggestion and point you to our cog
|
||||
board to request it for a third-party cog
|
||||
|
||||
If you are requesting a command:
|
||||
- Include what cog it should be in and a name for the command
|
||||
- Describe the intended functionality for the command
|
||||
- Note any restrictions on who can use the command or where it can be used
|
||||
|
||||
If you are requesting API functionality:
|
||||
- Describe what it should do
|
||||
- Note whether it is to extend existing functionality or introduce new functionality
|
||||
|
||||
-->
|
||||
27
.github/ISSUE_TEMPLATE/other_bug.md
vendored
Normal file
27
.github/ISSUE_TEMPLATE/other_bug.md
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: For bugs that don't involve a command.
|
||||
|
||||
---
|
||||
|
||||
# Other bugs
|
||||
|
||||
<!--
|
||||
Did you find a bug with something other than a command? Fill out the following:
|
||||
-->
|
||||
|
||||
#### What were you trying to do?
|
||||
|
||||
<!-- Replace this line with a description of what you were trying to do -->
|
||||
|
||||
#### What were you expecting to happen?
|
||||
|
||||
<!-- Replace this line with a description of what you were expecting to happen -->
|
||||
|
||||
#### What actually happened?
|
||||
|
||||
<!-- Replace this line with a description of what actually happened. Include any error messages -->
|
||||
|
||||
#### How can we reproduce this issue?
|
||||
|
||||
<!-- Replace with numbered steps to reproduce the issue -->
|
||||
15
.github/PULL_REQUEST_TEMPLATE/bugfix.md
vendored
Normal file
15
.github/PULL_REQUEST_TEMPLATE/bugfix.md
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
# Bugfix request
|
||||
|
||||
<!--
|
||||
THIS TEMPLATE IS CURRENTLY UNUSED DUE TO GITHUB LIMITATIONS!
|
||||
To be used for pull requests that fix a bug
|
||||
-->
|
||||
|
||||
#### Describe the bug being fixed
|
||||
|
||||
<!--
|
||||
If an issue exists for the bug, mention
|
||||
that this PR fixes that issue
|
||||
-->
|
||||
|
||||
#### Anything we need to know about this fix?
|
||||
21
.github/PULL_REQUEST_TEMPLATE/enhancement.md
vendored
Normal file
21
.github/PULL_REQUEST_TEMPLATE/enhancement.md
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
# Enhancement request
|
||||
|
||||
<!--
|
||||
THIS TEMPLATE IS CURRENTLY UNUSED DUE TO GITHUB LIMITATIONS!
|
||||
To be used for PRs which enhance existing features
|
||||
-->
|
||||
|
||||
#### Describe the enhancement
|
||||
|
||||
<!--
|
||||
Describe what your changes do.
|
||||
If adding commands, describe any restrictions on their usage.
|
||||
- For example, who can use the command? Where can it be used?
|
||||
-->
|
||||
|
||||
#### Does this enhancement break existing functionality?
|
||||
|
||||
<!-- To check a box, replace the space between the [] with a x -->
|
||||
|
||||
- [ ] Yes
|
||||
- [ ] No
|
||||
22
.github/PULL_REQUEST_TEMPLATE/new_feature.md
vendored
Normal file
22
.github/PULL_REQUEST_TEMPLATE/new_feature.md
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
# New feature addition
|
||||
|
||||
<!--
|
||||
THIS TEMPLATE IS CURRENTLY UNUSED DUE TO GITHUB LIMITATIONS!
|
||||
To be used for PRs which add a new feature
|
||||
Examples of this include new APIs, new core cogs, etc.
|
||||
-->
|
||||
|
||||
#### What type of feature is this?
|
||||
|
||||
<!-- To check a box, replace the space between the [] with a x -->
|
||||
|
||||
- [ ] New core cog
|
||||
- [ ] New API
|
||||
- [ ] Other
|
||||
|
||||
#### Describe the feature
|
||||
|
||||
<!--
|
||||
If you are adding a cog, describe its commands in detail (functionality, usage restrictions, etc).
|
||||
If the new feature introduces new requirements, please try to explain why they are necessary.
|
||||
-->
|
||||
16
.github/PULL_REQUEST_TEMPLATE/release.md
vendored
Normal file
16
.github/PULL_REQUEST_TEMPLATE/release.md
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
# New release
|
||||
|
||||
<!--
|
||||
THIS TEMPLATE IS CURRENTLY UNUSED DUE TO GITHUB LIMITATIONS!
|
||||
To be used by collaborators for doing releases.
|
||||
Most contributors will not need to use this.
|
||||
-->
|
||||
|
||||
#### Version
|
||||
|
||||
|
||||
|
||||
#### Has a draft release been created for this?
|
||||
|
||||
- [ ] Yes
|
||||
- [ ] No
|
||||
6
.github/PULL_REQUEST_TEMPLATE/translations.md
vendored
Normal file
6
.github/PULL_REQUEST_TEMPLATE/translations.md
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
# Translations update
|
||||
|
||||
<!--
|
||||
THIS TEMPLATE IS CURRENTLY UNUSED DUE TO GITHUB LIMITATIONS!
|
||||
Used for PRs updating translations from Crowdin
|
||||
-->
|
||||
4
.gitignore
vendored
4
.gitignore
vendored
@@ -6,3 +6,7 @@ data
|
||||
!data/audio/playlists/*
|
||||
*.exe
|
||||
*.dll
|
||||
start_red*
|
||||
start_launcher.sh
|
||||
start_launcher.command
|
||||
lib
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
# Red - A fully customizable Discord bot
|
||||
#### *Music, admin, trivia, fun commands and much more!*
|
||||
[<img src="https://img.shields.io/badge/Support-me!-orange.svg">](https://www.patreon.com/Twentysix26) [<img src="https://img.shields.io/badge/discord-py-blue.svg">](https://github.com/Rapptz/discord.py) [<img src="https://discordapp.com/api/guilds/133049272517001216/widget.png?style=shield">](https://discord.gg/red) [](https://travis-ci.org/Cog-Creators/Red-DiscordBot) [](http://makeapullrequest.com)
|
||||
[<img src="https://img.shields.io/badge/Support-Red!-orange.svg">](https://www.patreon.com/Red_Devs) [<img src="https://img.shields.io/badge/discord-py-blue.svg">](https://github.com/Rapptz/discord.py) [<img src="https://discordapp.com/api/guilds/133049272517001216/widget.png?style=shield">](https://discord.gg/red) [](https://travis-ci.org/Cog-Creators/Red-DiscordBot) [](http://makeapullrequest.com)
|
||||
|
||||
**Red** is a fully modular bot – meaning all features and commands can be enabled/disabled to your liking, making it completely customizable.
|
||||
This is also a *self-hosted bot* – meaning you will need to host and maintain your own instance. You can turn Red into an admin bot, music bot, trivia bot, new best friend or all of these together!
|
||||
|
||||
@@ -2,7 +2,6 @@ from discord.ext import commands
|
||||
from .utils.chat_formatting import box
|
||||
from .utils.dataIO import dataIO
|
||||
from .utils import checks
|
||||
from __main__ import user_allowed, send_cmd_help
|
||||
from copy import copy
|
||||
import os
|
||||
import discord
|
||||
@@ -19,7 +18,7 @@ class Alias:
|
||||
async def alias(self, ctx):
|
||||
"""Manage per-server aliases for commands"""
|
||||
if ctx.invoked_subcommand is None:
|
||||
await send_cmd_help(ctx)
|
||||
await self.bot.send_cmd_help(ctx)
|
||||
|
||||
@alias.command(name="add", pass_context=True, no_pm=True)
|
||||
@checks.mod_or_permissions(manage_server=True)
|
||||
@@ -121,7 +120,7 @@ class Alias:
|
||||
if not prefix:
|
||||
return
|
||||
|
||||
if server.id in self.aliases and user_allowed(message):
|
||||
if server.id in self.aliases and self.bot.user_allowed(message):
|
||||
alias = self.first_word(msg[len(prefix):]).lower()
|
||||
if alias in self.aliases[server.id]:
|
||||
new_command = self.aliases[server.id][alias]
|
||||
|
||||
284
cogs/audio.py
284
cogs/audio.py
@@ -7,7 +7,6 @@ from cogs.utils.dataIO import dataIO
|
||||
from cogs.utils import checks
|
||||
from cogs.utils.chat_formatting import pagify, escape
|
||||
from urllib.parse import urlparse
|
||||
from __main__ import send_cmd_help, settings
|
||||
from json import JSONDecodeError
|
||||
import re
|
||||
import logging
|
||||
@@ -19,6 +18,7 @@ import time
|
||||
import inspect
|
||||
import subprocess
|
||||
import urllib.parse
|
||||
import datetime
|
||||
from enum import Enum
|
||||
|
||||
__author__ = "tekulvw"
|
||||
@@ -148,6 +148,10 @@ class Song:
|
||||
self.duration = kwargs.pop('duration', 60)
|
||||
self.start_time = kwargs.pop('start_time', None)
|
||||
self.end_time = kwargs.pop('end_time', None)
|
||||
self.thumbnail = kwargs.pop('thumbnail', None)
|
||||
self.view_count = kwargs.pop('view_count', None)
|
||||
self.rating = kwargs.pop('average_rating', None)
|
||||
self.song_start_time = None
|
||||
|
||||
class QueuedSong:
|
||||
def __init__(self, url, channel):
|
||||
@@ -203,11 +207,11 @@ class Playlist:
|
||||
if self.main_class._playlist_exists_global(self.name):
|
||||
return False
|
||||
|
||||
admin_role = settings.get_server_admin(self.server)
|
||||
mod_role = settings.get_server_mod(self.server)
|
||||
admin_role = self.bot.settings.get_server_admin(self.server)
|
||||
mod_role = self.bot.settings.get_server_mod(self.server)
|
||||
|
||||
is_playlist_author = self.is_author(user)
|
||||
is_bot_owner = user.id == settings.owner
|
||||
is_bot_owner = user.id == self.bot.settings.owner
|
||||
is_server_owner = self.server.owner.id == self.author
|
||||
is_admin = discord.utils.get(user.roles, name=admin_role) is not None
|
||||
is_mod = discord.utils.get(user.roles, name=mod_role) is not None
|
||||
@@ -310,8 +314,10 @@ class Audio:
|
||||
self.queue = {} # add deque's, repeat
|
||||
self.downloaders = {} # sid: object
|
||||
self.settings = dataIO.load_json("data/audio/settings.json")
|
||||
self.settings_path = "data/audio/settings.json"
|
||||
self.server_specific_setting_keys = ["VOLUME", "VOTE_ENABLED",
|
||||
"VOTE_THRESHOLD", "NOPPL_DISCONNECT"]
|
||||
"VOTE_THRESHOLD", "NOPPL_DISCONNECT",
|
||||
"NOTIFY", "NOTIFY_CHANNEL", "TIMER_DISCONNECT"]
|
||||
self.cache_path = "data/audio/cache"
|
||||
self.local_playlist_path = "data/audio/localtracks"
|
||||
self._old_game = False
|
||||
@@ -353,14 +359,15 @@ class Audio:
|
||||
self.queue[server.id][QueueKey.QUEUE].appendleft(queued_song)
|
||||
|
||||
def _cache_desired_files(self):
|
||||
filelist = []
|
||||
filelist = set()
|
||||
|
||||
for server in self.downloaders:
|
||||
song = self.downloaders[server].song
|
||||
try:
|
||||
filelist.append(song.id)
|
||||
filelist.add(song.id)
|
||||
except AttributeError:
|
||||
pass
|
||||
shuffle(filelist)
|
||||
|
||||
return filelist
|
||||
|
||||
def _cache_max(self):
|
||||
@@ -373,13 +380,15 @@ class Audio:
|
||||
|
||||
def _cache_required_files(self):
|
||||
queue = copy.deepcopy(self.queue)
|
||||
filelist = []
|
||||
filelist = set()
|
||||
|
||||
for server in queue:
|
||||
now_playing = queue[server].get(QueueKey.NOW_PLAYING)
|
||||
try:
|
||||
filelist.append(now_playing.id)
|
||||
filelist.add(now_playing.id)
|
||||
except AttributeError:
|
||||
pass
|
||||
|
||||
return filelist
|
||||
|
||||
def _cache_size(self):
|
||||
@@ -545,8 +554,14 @@ class Audio:
|
||||
prev_size = self._cache_size()
|
||||
|
||||
for file in os.listdir(self.cache_path):
|
||||
if file not in reqd:
|
||||
if ignore_desired or file not in opt:
|
||||
if file in reqd:
|
||||
continue
|
||||
elif not ignore_desired:
|
||||
if file in opt:
|
||||
continue
|
||||
elif file.endswith('.part') and file[:-5] in opt:
|
||||
continue
|
||||
|
||||
try:
|
||||
os.remove(os.path.join(self.cache_path, file))
|
||||
except OSError:
|
||||
@@ -892,6 +907,7 @@ class Audio:
|
||||
except FileNotFoundError:
|
||||
raise
|
||||
|
||||
song.song_start_time = datetime.datetime.now()
|
||||
voice_client = await self._create_ffmpeg_player(server, song.id,
|
||||
local=local,
|
||||
start_time=song.start_time,
|
||||
@@ -1129,7 +1145,7 @@ class Audio:
|
||||
async def audioset(self, ctx):
|
||||
"""Audio settings."""
|
||||
if ctx.invoked_subcommand is None:
|
||||
await send_cmd_help(ctx)
|
||||
await self.bot.send_cmd_help(ctx)
|
||||
return
|
||||
|
||||
@audioset.command(name="cachemax")
|
||||
@@ -1177,6 +1193,35 @@ class Audio:
|
||||
await self.bot.say("Maximum length is now {} seconds.".format(length))
|
||||
self.save_settings()
|
||||
|
||||
@checks.mod_or_permissions(manage_messages=True)
|
||||
@audioset.command(name="notifychannel", pass_context=True)
|
||||
async def audioset_notifychannel(self, ctx, channel: discord.Channel):
|
||||
"""Sets the channel for the now playing announcement"""
|
||||
server = ctx.message.server
|
||||
if not server.me.permissions_in(channel).send_messages:
|
||||
await self.bot.say("No permissions to speak in that channel.")
|
||||
return
|
||||
self.set_server_setting(server, "NOTIFY_CHANNEL", channel.id)
|
||||
dataIO.save_json(self.settings_path, self.settings)
|
||||
await self.bot.send_message(channel, "I will now announce new songs here.")
|
||||
|
||||
@audioset.command(name="notify", pass_context=True)
|
||||
@checks.mod_or_permissions(manage_messages=True)
|
||||
async def audioset_notify(self, ctx):
|
||||
"""Sends a notification to the channel when the song changes"""
|
||||
server = ctx.message.server
|
||||
settings = self.get_server_settings(server.id)
|
||||
notify = settings.get("NOTIFY", True)
|
||||
self.set_server_setting(server, "NOTIFY", not notify)
|
||||
if self.get_server_settings(server)["NOTIFY_CHANNEL"] is None:
|
||||
self.set_server_setting(server, "NOTIFY_CHANNEL", ctx.message.channel.id)
|
||||
dataIO.save_json(self.settings_path, self.settings)
|
||||
if not notify:
|
||||
await self.bot.say("Now notifying when a new track plays.")
|
||||
else:
|
||||
await self.bot.say("No longer notifying when a new track plays.")
|
||||
self.save_settings()
|
||||
|
||||
@audioset.command(name="player")
|
||||
@checks.is_owner()
|
||||
async def audioset_player(self):
|
||||
@@ -1204,6 +1249,26 @@ class Audio:
|
||||
" status")
|
||||
self.save_settings()
|
||||
|
||||
@audioset.command(name="timerdisconnect", pass_context=True)
|
||||
@checks.mod_or_permissions(manage_messages=True)
|
||||
async def audioset_timerdisconnect(self, ctx):
|
||||
"""Toggles the disconnect timer"""
|
||||
server = ctx.message.server
|
||||
settings = self.get_server_settings(server.id)
|
||||
timer_disconnect = settings.get("TIMER_DISCONNECT", True)
|
||||
self.set_server_setting(server, "TIMER_DISCONNECT",
|
||||
not timer_disconnect)
|
||||
if not timer_disconnect:
|
||||
await self.bot.say("The bot will automatically disconnect after"
|
||||
" playback is stopped and five minutes have"
|
||||
" elapsed. Disable this setting to stop the"
|
||||
" bot from disconnecting with other music cogs"
|
||||
" playing.")
|
||||
else:
|
||||
await self.bot.say("The bot will no longer auto disconnect"
|
||||
" while other music cogs are playing.")
|
||||
self.save_settings()
|
||||
|
||||
@audioset.command(pass_context=True, name="volume", no_pm=True)
|
||||
@checks.mod_or_permissions(manage_messages=True)
|
||||
async def audioset_volume(self, ctx, percent: int=None):
|
||||
@@ -1257,7 +1322,7 @@ class Audio:
|
||||
async def audiostat(self, ctx):
|
||||
"""General stats on audio stuff."""
|
||||
if ctx.invoked_subcommand is None:
|
||||
await send_cmd_help(ctx)
|
||||
await self.bot.send_cmd_help(ctx)
|
||||
return
|
||||
|
||||
@audiostat.command(name="servers")
|
||||
@@ -1273,7 +1338,7 @@ class Audio:
|
||||
async def cache(self, ctx):
|
||||
"""Cache management tools."""
|
||||
if ctx.invoked_subcommand is None:
|
||||
await send_cmd_help(ctx)
|
||||
await self.bot.send_cmd_help(ctx)
|
||||
return
|
||||
|
||||
@cache.command(name="dump")
|
||||
@@ -1330,7 +1395,7 @@ class Audio:
|
||||
async def local(self, ctx):
|
||||
"""Local playlists commands"""
|
||||
if ctx.invoked_subcommand is None:
|
||||
await send_cmd_help(ctx)
|
||||
await self.bot.send_cmd_help(ctx)
|
||||
|
||||
@local.command(name="start", pass_context=True, no_pm=True)
|
||||
async def play_local(self, ctx, *, name):
|
||||
@@ -1426,6 +1491,10 @@ class Audio:
|
||||
voice_channel = author.voice_channel
|
||||
channel = ctx.message.channel
|
||||
|
||||
if "www.youtube.com/playlist" in url:
|
||||
await self.bot.send_message(channel, "Use [p]playlist to manage playlist urls.")
|
||||
return
|
||||
|
||||
# Checking if playing in current server
|
||||
|
||||
if self.is_playing(server):
|
||||
@@ -1522,7 +1591,7 @@ class Audio:
|
||||
async def playlist(self, ctx):
|
||||
"""Playlist management/control."""
|
||||
if ctx.invoked_subcommand is None:
|
||||
await send_cmd_help(ctx)
|
||||
await self.bot.send_cmd_help(ctx)
|
||||
|
||||
@playlist.command(pass_context=True, no_pm=True, name="create")
|
||||
async def playlist_create(self, ctx, name):
|
||||
@@ -1771,22 +1840,27 @@ class Audio:
|
||||
"""Not a command, use `queue` with no args to call this."""
|
||||
server = ctx.message.server
|
||||
channel = ctx.message.channel
|
||||
if server.id not in self.queue:
|
||||
now_playing = self._get_queue_nowplaying(server)
|
||||
if server.id not in self.queue and now_playing is None:
|
||||
await self.bot.say("Nothing playing on this server!")
|
||||
return
|
||||
elif len(self.queue[server.id][QueueKey.QUEUE]) == 0:
|
||||
if len(self.queue[server.id][QueueKey.QUEUE]) == 0 and not self.is_playing(server):
|
||||
await self.bot.say("Nothing queued on this server.")
|
||||
return
|
||||
|
||||
colour = ''.join([choice('0123456789ABCDEF') for x in range(6)])
|
||||
em = discord.Embed(description="", colour=int(colour, 16))
|
||||
msg = ""
|
||||
|
||||
now_playing = self._get_queue_nowplaying(server)
|
||||
if self.is_playing(server):
|
||||
msg += "\n***Currently playing:***\n{}\n".format(now_playing.title)
|
||||
msg += self._draw_play(now_playing, server) + "\n" # draw play thing
|
||||
if now_playing.thumbnail is None:
|
||||
now_playing.thumbnail = (self.bot.user.avatar_url).replace('webp', 'png')
|
||||
em.set_thumbnail(url=now_playing.thumbnail)
|
||||
|
||||
if now_playing is not None:
|
||||
msg += "\n***Now playing:***\n{}\n".format(now_playing.title)
|
||||
|
||||
queued_song_list = self._get_queue(server, 5)
|
||||
tempqueued_song_list = self._get_queue_tempqueue(server, 5)
|
||||
queued_song_list = self._get_queue(server, 10)
|
||||
tempqueued_song_list = self._get_queue_tempqueue(server, 10)
|
||||
|
||||
await self.bot.say("Gathering information...")
|
||||
|
||||
@@ -1795,21 +1869,65 @@ class Audio:
|
||||
|
||||
song_info = []
|
||||
for num, song in enumerate(tempqueue_song_list, 1):
|
||||
str_duration = str(datetime.timedelta(seconds=song.duration))
|
||||
try:
|
||||
song_info.append("{}. {.title}".format(num, song))
|
||||
if song.title is None:
|
||||
song_info.append("**[{}]** {.webpage_url} ({})".format(num, song, str_duration))
|
||||
else:
|
||||
song_info.append("**[{}]** {.title} ({})".format(num, song, str_duration))
|
||||
except AttributeError:
|
||||
song_info.append("{}. {.webpage_url}".format(num, song))
|
||||
song_info.append("**[{}]** {.webpage_url} ({})".format(num, song, str_duration))
|
||||
|
||||
for num, song in enumerate(queue_song_list, len(song_info) + 1):
|
||||
if num > 5:
|
||||
str_duration = str(datetime.timedelta(seconds=song.duration))
|
||||
if num > 10:
|
||||
break
|
||||
try:
|
||||
song_info.append("{}. {.title}".format(num, song))
|
||||
if song.title is None:
|
||||
song_info.append("**[{}]** {.webpage_url} ({})".format(num, song, str_duration))
|
||||
else:
|
||||
song_info.append("**[{}]** {.title} ({})".format(num, song, str_duration))
|
||||
except AttributeError:
|
||||
song_info.append("{}. {.webpage_url}".format(num, song))
|
||||
msg += "\n***Next up:***\n" + "\n".join(song_info)
|
||||
song_info.append("**[{}]** {.webpage_url} ({})".format(num, song, str_duration))
|
||||
|
||||
await self.bot.say(msg)
|
||||
if song_info:
|
||||
msg += "\n***Next up:***\n" + "\n".join(song_info)
|
||||
em.description = msg.replace('None', '-')
|
||||
more_songs = len(self.queue[server.id][QueueKey.QUEUE]) - 10
|
||||
if more_songs > 0:
|
||||
em.set_footer(text="And {} more songs...".format(more_songs))
|
||||
await self.bot.say(embed=em)
|
||||
|
||||
def _draw_play(self, song, server):
|
||||
song_start_time = song.song_start_time
|
||||
total_time = datetime.timedelta(seconds=song.duration)
|
||||
current_time = datetime.datetime.now()
|
||||
elapsed_time = current_time - song_start_time
|
||||
sections = 12
|
||||
loc_time = round((elapsed_time/total_time) * sections) # 10 sections
|
||||
|
||||
bar_char = '\N{BOX DRAWINGS HEAVY HORIZONTAL}'
|
||||
seek_char = '\N{RADIO BUTTON}'
|
||||
play_char = '\N{BLACK RIGHT-POINTING TRIANGLE}'
|
||||
|
||||
try:
|
||||
if self.voice_client(server).audio_player.is_playing():
|
||||
play_char = '\N{BLACK RIGHT-POINTING TRIANGLE}'
|
||||
else:
|
||||
play_char = '\N{DOUBLE VERTICAL BAR}'
|
||||
except AttributeError:
|
||||
pass
|
||||
|
||||
msg = "\n" + play_char + " "
|
||||
|
||||
for i in range(sections):
|
||||
if i == loc_time:
|
||||
msg += seek_char
|
||||
else:
|
||||
msg += bar_char
|
||||
|
||||
msg += " `{}`/`{}`".format(str(elapsed_time)[0:7],str(total_time))
|
||||
return msg
|
||||
|
||||
@commands.group(pass_context=True, no_pm=True)
|
||||
async def repeat(self, ctx):
|
||||
@@ -1929,10 +2047,10 @@ class Audio:
|
||||
if not self.get_server_settings(server)["VOTE_ENABLED"]:
|
||||
return True
|
||||
|
||||
admin_role = settings.get_server_admin(server)
|
||||
mod_role = settings.get_server_mod(server)
|
||||
admin_role = self.bot.settings.get_server_admin(server)
|
||||
mod_role = self.bot.settings.get_server_mod(server)
|
||||
|
||||
is_owner = member.id == settings.owner
|
||||
is_owner = member.id == self.bot.settings.owner
|
||||
is_server_owner = member == server.owner
|
||||
is_admin = discord.utils.get(member.roles, name=admin_role) is not None
|
||||
is_mod = discord.utils.get(member.roles, name=mod_role) is not None
|
||||
@@ -1950,7 +2068,7 @@ class Audio:
|
||||
url = "https://www.youtube.com/watch?v={}".format(choice(ids))
|
||||
await ctx.invoke(self.play, url_or_search_terms=url)
|
||||
|
||||
@commands.command(pass_context=True, no_pm=True)
|
||||
@commands.command(pass_context=True, aliases=["np"], no_pm=True)
|
||||
async def song(self, ctx):
|
||||
"""Info about the current song."""
|
||||
server = ctx.message.server
|
||||
@@ -1966,6 +2084,10 @@ class Audio:
|
||||
song.view_count = None
|
||||
if not hasattr(song, 'uploader'):
|
||||
song.uploader = None
|
||||
if song.rating is None:
|
||||
song.rating = 0
|
||||
if song.thumbnail is None:
|
||||
song.thumbnail = (self.bot.user.avatar_url).replace('webp', 'png')
|
||||
if hasattr(song, 'duration'):
|
||||
m, s = divmod(song.duration, 60)
|
||||
h, m = divmod(m, 60)
|
||||
@@ -1975,14 +2097,22 @@ class Audio:
|
||||
dur = "{0}:{1:0>2}".format(m, s)
|
||||
else:
|
||||
dur = None
|
||||
msg = ("\n**Title:** {}\n**Author:** {}\n**Uploader:** {}\n"
|
||||
"**Views:** {}\n**Duration:** {}\n\n<{}>".format(
|
||||
song.title, song.creator, song.uploader,
|
||||
song.view_count, dur, song.webpage_url))
|
||||
await self.bot.say(msg.replace("**Author:** None\n", "")
|
||||
.replace("**Views:** None\n", "")
|
||||
.replace("**Uploader:** None\n", "")
|
||||
.replace("**Duration:** None\n", ""))
|
||||
|
||||
msg = ("**Author:** `{}`\n**Uploader:** `{}`\n"
|
||||
"**Duration:** `{}`\n**Rating: **`{:.2f}`\n**Views:** `{}`".format(
|
||||
song.creator, song.uploader, str(datetime.timedelta(seconds=song.duration)), song.rating,
|
||||
song.view_count))
|
||||
msg += self._draw_play(song, server) + "\n"
|
||||
colour = ''.join([choice('0123456789ABCDEF') for x in range(6)])
|
||||
em = discord.Embed(description="", colour=int(colour, 16))
|
||||
if 'http' not in song.webpage_url:
|
||||
em.set_author(name=song.title)
|
||||
else:
|
||||
em.set_author(name=song.title, url=song.webpage_url)
|
||||
em.set_thumbnail(url=song.thumbnail)
|
||||
em.description = msg.replace('None', '-')
|
||||
|
||||
await self.bot.say("**Currently Playing:**", embed=em)
|
||||
else:
|
||||
await self.bot.say("Darude - Sandstorm.")
|
||||
|
||||
@@ -2072,6 +2202,9 @@ class Audio:
|
||||
if stop_times[server] and \
|
||||
int(time.time()) - stop_times[server] > 300:
|
||||
# 5 min not playing to d/c
|
||||
timer_disconnect = self.get_server_settings(server)
|
||||
timer_disconnect = timer_disconnect.get("TIMER_DISCONNECT", True)
|
||||
if timer_disconnect:
|
||||
log.debug("dcing from sid {} after 300s".format(server.id))
|
||||
self._clear_queue(server)
|
||||
await self._stop_and_disconnect(server)
|
||||
@@ -2093,6 +2226,15 @@ class Audio:
|
||||
if "NOPPL_DISCONNECT" not in ret:
|
||||
ret["NOPPL_DISCONNECT"] = True
|
||||
|
||||
if "NOTIFY" not in ret:
|
||||
ret["NOTIFY"] = False
|
||||
|
||||
if "NOTIFY_CHANNEL" not in ret:
|
||||
ret["NOTIFY_CHANNEL"] = None
|
||||
|
||||
if "TIMER_DISCONNECT" not in ret:
|
||||
ret["TIMER_DISCONNECT"] = True
|
||||
|
||||
for setting in self.server_specific_setting_keys:
|
||||
if setting not in ret:
|
||||
# Add the default
|
||||
@@ -2109,7 +2251,8 @@ class Audio:
|
||||
channel = author.voice_channel
|
||||
|
||||
if channel:
|
||||
is_admin = channel.permissions_for(server.me).administrator
|
||||
in_channel = bool(server.me in channel.voice_members)
|
||||
can_move = channel.permissions_for(server.me).move_members
|
||||
if channel.user_limit == 0:
|
||||
is_full = False
|
||||
else:
|
||||
@@ -2117,11 +2260,11 @@ class Audio:
|
||||
|
||||
if channel is None:
|
||||
raise AuthorNotConnected
|
||||
elif channel.permissions_for(server.me).connect is False:
|
||||
elif channel.permissions_for(server.me).connect is False and not in_channel:
|
||||
raise UnauthorizedConnect
|
||||
elif channel.permissions_for(server.me).speak is False:
|
||||
raise UnauthorizedSpeak
|
||||
elif is_full and not is_admin:
|
||||
elif is_full and not can_move and not in_channel:
|
||||
raise ChannelUserLimit
|
||||
else:
|
||||
return True
|
||||
@@ -2131,6 +2274,10 @@ class Audio:
|
||||
"""This function assumes that there's something in the queue for us to
|
||||
play"""
|
||||
server = self.bot.get_server(sid)
|
||||
if self.get_server_settings(server)["NOTIFY"] is True:
|
||||
notify_channel = self.settings["SERVERS"][server.id]["NOTIFY_CHANNEL"]
|
||||
if self.get_server_settings(server)["NOTIFY"] is False:
|
||||
notify_channel = None
|
||||
max_length = self.settings["MAX_LENGTH"]
|
||||
|
||||
# This is a reference, or should be at least
|
||||
@@ -2158,6 +2305,7 @@ class Audio:
|
||||
url = queued_song.url
|
||||
channel = queued_song.channel
|
||||
song = await self._play(sid, url, channel)
|
||||
await self.display_now_playing(server, song, notify_channel)
|
||||
except MaximumLength:
|
||||
return
|
||||
elif len(queue) > 0: # We're in the normal queue
|
||||
@@ -2167,6 +2315,7 @@ class Audio:
|
||||
log.debug("calling _play on the normal queue")
|
||||
try:
|
||||
song = await self._play(sid, url, channel)
|
||||
await self.display_now_playing(server, song, notify_channel)
|
||||
except MaximumLength:
|
||||
return
|
||||
if repeat and last_song:
|
||||
@@ -2210,6 +2359,47 @@ class Audio:
|
||||
message = escape(message, mass_mentions=True)
|
||||
await self.bot.send_message(next_channel, message)
|
||||
|
||||
async def display_now_playing(self, server, song, notify_channel:int):
|
||||
channel = discord.utils.get(server.channels, id=notify_channel)
|
||||
if channel is None:
|
||||
return
|
||||
if song.title is None:
|
||||
return
|
||||
def to_delete(m):
|
||||
if "Now Playing" in m.content and m.author == self.bot.user:
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
try:
|
||||
await self.bot.purge_from(channel, limit=50, check=to_delete)
|
||||
except discord.errors.Forbidden:
|
||||
await self.bot.say("I need permissions to manage messages in this channel.")
|
||||
|
||||
if song:
|
||||
if not hasattr(song, 'creator'):
|
||||
song.creator = None
|
||||
if not hasattr(song, 'uploader'):
|
||||
song.uploader = None
|
||||
if song.rating is None:
|
||||
song.rating = 0
|
||||
if song.thumbnail is None:
|
||||
song.thumbnail = (self.bot.user.avatar_url).replace('webp', 'png')
|
||||
|
||||
msg = ("**Author:** `{}`\n**Uploader:** `{}`\n"
|
||||
"**Duration:** `{}`\n**Rating: **`{:.2f}`\n**Views:** `{}`".format(
|
||||
song.creator, song.uploader, str(datetime.timedelta(seconds=song.duration)), song.rating, song.view_count))
|
||||
|
||||
colour = ''.join([choice('0123456789ABCDEF') for x in range(6)])
|
||||
em = discord.Embed(description="", colour=int(colour, 16))
|
||||
if 'http' not in song.webpage_url:
|
||||
em.set_author(name=song.title)
|
||||
else:
|
||||
em.set_author(name=song.title, url=song.webpage_url)
|
||||
em.set_thumbnail(url=song.thumbnail)
|
||||
em.description = msg.replace('None', '-')
|
||||
|
||||
await self.bot.send_message(channel, "**Now Playing:**", embed=em)
|
||||
|
||||
async def queue_scheduler(self):
|
||||
while self == self.bot.get_cog('Audio'):
|
||||
tasks = []
|
||||
|
||||
@@ -2,7 +2,6 @@ from discord.ext import commands
|
||||
from cogs.utils.dataIO import dataIO
|
||||
from cogs.utils import checks
|
||||
from cogs.utils.chat_formatting import pagify, box
|
||||
from __main__ import send_cmd_help, set_cog
|
||||
import os
|
||||
from subprocess import run as sp_run, PIPE
|
||||
import shutil
|
||||
@@ -63,14 +62,14 @@ class Downloader:
|
||||
async def cog(self, ctx):
|
||||
"""Additional cogs management"""
|
||||
if ctx.invoked_subcommand is None:
|
||||
await send_cmd_help(ctx)
|
||||
await self.bot.send_cmd_help(ctx)
|
||||
|
||||
@cog.group(pass_context=True)
|
||||
async def repo(self, ctx):
|
||||
"""Repo management commands"""
|
||||
if ctx.invoked_subcommand is None or \
|
||||
isinstance(ctx.invoked_subcommand, commands.Group):
|
||||
await send_cmd_help(ctx)
|
||||
await self.bot.send_cmd_help(ctx)
|
||||
return
|
||||
|
||||
@repo.command(name="add", pass_context=True)
|
||||
@@ -375,7 +374,7 @@ class Downloader:
|
||||
if cog not in self.repos[repo_name]:
|
||||
await self.bot.say("That cog isn't available from that repo.")
|
||||
return
|
||||
set_cog("cogs." + cog, False)
|
||||
self.bot.set_cog("cogs." + cog, False)
|
||||
self.repos[repo_name][cog]['INSTALLED'] = False
|
||||
self.save_repos()
|
||||
os.remove(os.path.join("cogs", cog + ".py"))
|
||||
@@ -412,7 +411,7 @@ class Downloader:
|
||||
await self.bot.say("Ok then, you can load it with"
|
||||
" `{}load {}`".format(ctx.prefix, cog))
|
||||
elif answer.content.lower().strip() == "yes":
|
||||
set_cog("cogs." + cog, True)
|
||||
self.bot.set_cog("cogs." + cog, True)
|
||||
owner = self.bot.get_cog('Owner')
|
||||
await owner.load.callback(owner, cog_name=cog)
|
||||
else:
|
||||
@@ -527,7 +526,10 @@ class Downloader:
|
||||
return git_name[:-4]
|
||||
|
||||
def is_lib_installed(self, name):
|
||||
try:
|
||||
return bool(find_spec(name))
|
||||
except ImportError:
|
||||
return False
|
||||
|
||||
def _do_first_run(self):
|
||||
save = False
|
||||
@@ -654,7 +656,13 @@ class Downloader:
|
||||
continue
|
||||
|
||||
status, _, cogpath = f.partition('\t')
|
||||
cogname = os.path.split(cogpath)[-1][:-3] # strip .py
|
||||
split = os.path.split(cogpath)
|
||||
cogdir, cogname = split[-2:]
|
||||
cogname = cogname[:-3] # strip .py
|
||||
|
||||
if len(split) != 2 or cogdir != cogname:
|
||||
continue
|
||||
|
||||
if status not in ret:
|
||||
ret[status] = []
|
||||
ret[status].append(cogname)
|
||||
|
||||
@@ -7,7 +7,6 @@ from copy import deepcopy
|
||||
from .utils import checks
|
||||
from cogs.utils.chat_formatting import pagify, box
|
||||
from enum import Enum
|
||||
from __main__ import send_cmd_help
|
||||
import os
|
||||
import time
|
||||
import logging
|
||||
@@ -302,7 +301,7 @@ class Economy:
|
||||
async def _bank(self, ctx):
|
||||
"""Bank operations"""
|
||||
if ctx.invoked_subcommand is None:
|
||||
await send_cmd_help(ctx)
|
||||
await self.bot.send_cmd_help(ctx)
|
||||
|
||||
@_bank.command(pass_context=True, no_pm=True)
|
||||
async def register(self, ctx):
|
||||
@@ -454,11 +453,14 @@ class Economy:
|
||||
async def leaderboard(self, ctx):
|
||||
"""Server / global leaderboard
|
||||
|
||||
Defaults to server"""
|
||||
Defaults to \"server\" if not issued in DM"""
|
||||
if ctx.invoked_subcommand is None:
|
||||
if ctx.message.server:
|
||||
await ctx.invoke(self._server_leaderboard)
|
||||
else:
|
||||
await ctx.invoke(self._global_leaderboard)
|
||||
|
||||
@leaderboard.command(name="server", pass_context=True)
|
||||
@leaderboard.command(name="server", pass_context=True, no_pm=True)
|
||||
async def _server_leaderboard(self, ctx, top: int=10):
|
||||
"""Prints out the server's leaderboard
|
||||
|
||||
@@ -623,7 +625,7 @@ class Economy:
|
||||
for k, v in settings.items():
|
||||
msg += "{}: {}\n".format(k, v)
|
||||
msg += "```"
|
||||
await send_cmd_help(ctx)
|
||||
await self.bot.send_cmd_help(ctx)
|
||||
await self.bot.say(msg)
|
||||
|
||||
@economyset.command(pass_context=True)
|
||||
|
||||
@@ -154,7 +154,7 @@ class General:
|
||||
@commands.command()
|
||||
async def lmgtfy(self, *, search_terms : str):
|
||||
"""Creates a lmgtfy link"""
|
||||
search_terms = escape_mass_mentions(search_terms.replace(" ", "+"))
|
||||
search_terms = escape_mass_mentions(search_terms.replace("+","%2B").replace(" ", "+"))
|
||||
await self.bot.say("https://lmgtfy.com/?q={}".format(search_terms))
|
||||
|
||||
@commands.command(no_pm=True, hidden=True)
|
||||
@@ -188,11 +188,16 @@ class General:
|
||||
|
||||
joined_at = self.fetch_joined_at(user, server)
|
||||
since_created = (ctx.message.timestamp - user.created_at).days
|
||||
if joined_at is not None:
|
||||
since_joined = (ctx.message.timestamp - joined_at).days
|
||||
user_joined = joined_at.strftime("%d %b %Y %H:%M")
|
||||
else:
|
||||
since_joined = "?"
|
||||
user_joined = "Unknown"
|
||||
user_created = user.created_at.strftime("%d %b %Y %H:%M")
|
||||
member_number = sorted(server.members,
|
||||
key=lambda m: m.joined_at).index(user) + 1
|
||||
member_number = (sorted(server.members,
|
||||
key=lambda m: m.joined_at or ctx.message.timestamp)
|
||||
.index(user) + 1)
|
||||
|
||||
created_on = "{}\n({} days ago)".format(user_created, since_created)
|
||||
joined_on = "{}\n({} days ago)".format(user_joined, since_joined)
|
||||
@@ -240,8 +245,7 @@ class General:
|
||||
"""Shows server's informations"""
|
||||
server = ctx.message.server
|
||||
online = len([m.status for m in server.members
|
||||
if m.status == discord.Status.online or
|
||||
m.status == discord.Status.idle])
|
||||
if m.status != discord.Status.offline])
|
||||
total_users = len(server.members)
|
||||
text_channels = len([x for x in server.channels
|
||||
if x.type == discord.ChannelType.text])
|
||||
|
||||
66
cogs/mod.py
66
cogs/mod.py
@@ -2,7 +2,6 @@ import discord
|
||||
from discord.ext import commands
|
||||
from .utils.dataIO import dataIO
|
||||
from .utils import checks
|
||||
from __main__ import send_cmd_help, settings
|
||||
from datetime import datetime
|
||||
from collections import deque, defaultdict, OrderedDict
|
||||
from cogs.utils.chat_formatting import escape_mass_mentions, box, pagify
|
||||
@@ -113,8 +112,8 @@ class Mod:
|
||||
"""Manages server administration settings."""
|
||||
if ctx.invoked_subcommand is None:
|
||||
server = ctx.message.server
|
||||
await send_cmd_help(ctx)
|
||||
roles = settings.get_server(server).copy()
|
||||
await self.bot.send_cmd_help(ctx)
|
||||
roles = self.bot.settings.get_server(server).copy()
|
||||
_settings = {**self.settings[server.id], **roles}
|
||||
if "respect_hierarchy" not in _settings:
|
||||
_settings["respect_hierarchy"] = default_settings["respect_hierarchy"]
|
||||
@@ -155,7 +154,7 @@ class Mod:
|
||||
"".format(channel.mention))
|
||||
else:
|
||||
if self.settings[server.id]["mod-log"] is None:
|
||||
await send_cmd_help(ctx)
|
||||
await self.bot.send_cmd_help(ctx)
|
||||
return
|
||||
self.settings[server.id]["mod-log"] = None
|
||||
await self.bot.say("Mod log deactivated.")
|
||||
@@ -177,7 +176,7 @@ class Mod:
|
||||
"".format(max_mentions))
|
||||
else:
|
||||
if self.settings[server.id]["ban_mention_spam"] is False:
|
||||
await send_cmd_help(ctx)
|
||||
await self.bot.send_cmd_help(ctx)
|
||||
return
|
||||
self.settings[server.id]["ban_mention_spam"] = False
|
||||
await self.bot.say("Autoban for mention spam disabled.")
|
||||
@@ -690,7 +689,7 @@ class Mod:
|
||||
async def cleanup(self, ctx):
|
||||
"""Deletes messages."""
|
||||
if ctx.invoked_subcommand is None:
|
||||
await send_cmd_help(ctx)
|
||||
await self.bot.send_cmd_help(ctx)
|
||||
|
||||
@cleanup.command(pass_context=True, no_pm=True)
|
||||
async def text(self, ctx, text: str, number: int):
|
||||
@@ -1014,7 +1013,7 @@ class Mod:
|
||||
try:
|
||||
case = int(case)
|
||||
if not reason:
|
||||
await send_cmd_help(ctx)
|
||||
await self.bot.send_cmd_help(ctx)
|
||||
return
|
||||
except:
|
||||
if reason:
|
||||
@@ -1023,7 +1022,7 @@ class Mod:
|
||||
reason = case
|
||||
case = self.last_case[server.id].get(author.id)
|
||||
if case is None:
|
||||
await send_cmd_help(ctx)
|
||||
await self.bot.send_cmd_help(ctx)
|
||||
return
|
||||
try:
|
||||
await self.update_case(server, case=case, mod=author,
|
||||
@@ -1047,7 +1046,7 @@ class Mod:
|
||||
async def ignore(self, ctx):
|
||||
"""Adds servers/channels to ignorelist"""
|
||||
if ctx.invoked_subcommand is None:
|
||||
await send_cmd_help(ctx)
|
||||
await self.bot.send_cmd_help(ctx)
|
||||
await self.bot.say(self.count_ignored())
|
||||
|
||||
@ignore.command(name="channel", pass_context=True)
|
||||
@@ -1087,7 +1086,7 @@ class Mod:
|
||||
async def unignore(self, ctx):
|
||||
"""Removes servers/channels from ignorelist"""
|
||||
if ctx.invoked_subcommand is None:
|
||||
await send_cmd_help(ctx)
|
||||
await self.bot.send_cmd_help(ctx)
|
||||
await self.bot.say(self.count_ignored())
|
||||
|
||||
@unignore.command(name="channel", pass_context=True)
|
||||
@@ -1135,9 +1134,11 @@ class Mod:
|
||||
|
||||
Use double quotes to add/remove sentences
|
||||
Using this command with no subcommands will send
|
||||
the list of the server's filtered words."""
|
||||
the list of the server's filtered words.
|
||||
Bot owners, server owners and mods / admins are immune
|
||||
to the filter"""
|
||||
if ctx.invoked_subcommand is None:
|
||||
await send_cmd_help(ctx)
|
||||
await self.bot.send_cmd_help(ctx)
|
||||
server = ctx.message.server
|
||||
author = ctx.message.author
|
||||
if server.id in self.filter:
|
||||
@@ -1159,9 +1160,12 @@ class Mod:
|
||||
filter add word1 word2 word3
|
||||
filter add \"This is a sentence\""""
|
||||
if words == ():
|
||||
await send_cmd_help(ctx)
|
||||
await self.bot.send_cmd_help(ctx)
|
||||
return
|
||||
server = ctx.message.server
|
||||
explanation = ("Please note: the filter will only work in channels "
|
||||
"where the bot has the `manage_messages` "
|
||||
"permission.")
|
||||
added = 0
|
||||
if server.id not in self.filter.keys():
|
||||
self.filter[server.id] = []
|
||||
@@ -1171,7 +1175,8 @@ class Mod:
|
||||
added += 1
|
||||
if added:
|
||||
dataIO.save_json("data/mod/filter.json", self.filter)
|
||||
await self.bot.say("Words added to filter.")
|
||||
await self.bot.say("Words added to filter.\n" +
|
||||
explanation)
|
||||
else:
|
||||
await self.bot.say("Words already in the filter.")
|
||||
|
||||
@@ -1184,7 +1189,7 @@ class Mod:
|
||||
filter remove word1 word2 word3
|
||||
filter remove \"This is a sentence\""""
|
||||
if words == ():
|
||||
await send_cmd_help(ctx)
|
||||
await self.bot.send_cmd_help(ctx)
|
||||
return
|
||||
server = ctx.message.server
|
||||
removed = 0
|
||||
@@ -1206,7 +1211,7 @@ class Mod:
|
||||
async def editrole(self, ctx):
|
||||
"""Edits roles settings"""
|
||||
if ctx.invoked_subcommand is None:
|
||||
await send_cmd_help(ctx)
|
||||
await self.bot.send_cmd_help(ctx)
|
||||
|
||||
@editrole.command(aliases=["color"], pass_context=True)
|
||||
async def colour(self, ctx, role: discord.Role, value: discord.Colour):
|
||||
@@ -1308,12 +1313,12 @@ class Mod:
|
||||
raise TypeError('Only messages, members or roles may be passed')
|
||||
|
||||
server = obj.server
|
||||
admin_role = settings.get_server_admin(server)
|
||||
admin_role = self.bot.settings.get_server_admin(server)
|
||||
|
||||
if isinstance(obj, discord.Role):
|
||||
return obj.name == admin_role
|
||||
|
||||
if user.id == settings.owner:
|
||||
if user.id == self.bot.settings.owner:
|
||||
return True
|
||||
elif discord.utils.get(user.roles, name=admin_role):
|
||||
return True
|
||||
@@ -1331,13 +1336,13 @@ class Mod:
|
||||
raise TypeError('Only messages, members or roles may be passed')
|
||||
|
||||
server = obj.server
|
||||
admin_role = settings.get_server_admin(server)
|
||||
mod_role = settings.get_server_mod(server)
|
||||
admin_role = self.bot.settings.get_server_admin(server)
|
||||
mod_role = self.bot.settings.get_server_mod(server)
|
||||
|
||||
if isinstance(obj, discord.Role):
|
||||
return obj.name in [admin_role, mod_role]
|
||||
|
||||
if user.id == settings.owner:
|
||||
if user.id == self.bot.settings.owner:
|
||||
return True
|
||||
elif discord.utils.get(user.roles, name=admin_role):
|
||||
return True
|
||||
@@ -1356,14 +1361,16 @@ class Mod:
|
||||
else:
|
||||
return mod.top_role.position > user.top_role.position or is_special
|
||||
|
||||
async def new_case(self, server, *, action, mod=None, user, reason=None, until=None, channel=None):
|
||||
async def new_case(self, server, *, action, mod=None, user, reason=None, until=None, channel=None, force_create=False):
|
||||
action_type = action.lower() + "_cases"
|
||||
if not self.settings[server.id].get(action_type, default_settings[action_type]):
|
||||
return
|
||||
|
||||
enabled_case = self.settings.get(server.id, {}).get(action_type, default_settings.get(action_type))
|
||||
if not force_create and not enabled_case:
|
||||
return False
|
||||
|
||||
mod_channel = server.get_channel(self.settings[server.id]["mod-log"])
|
||||
if mod_channel is None:
|
||||
return
|
||||
return None
|
||||
|
||||
if server.id not in self.cases:
|
||||
self.cases[server.id] = {}
|
||||
@@ -1384,7 +1391,7 @@ class Mod:
|
||||
"amended_by" : None,
|
||||
"amended_id" : None,
|
||||
"message" : None,
|
||||
"until" : None,
|
||||
"until" : until.timestamp() if until else None,
|
||||
}
|
||||
|
||||
case_msg = self.format_case_msg(case)
|
||||
@@ -1402,6 +1409,8 @@ class Mod:
|
||||
|
||||
dataIO.save_json("data/mod/modlog.json", self.cases)
|
||||
|
||||
return case_n
|
||||
|
||||
async def update_case(self, server, *, case, mod=None, reason=None,
|
||||
until=False):
|
||||
channel = server.get_channel(self.settings[server.id]["mod-log"])
|
||||
@@ -1461,6 +1470,11 @@ class Mod:
|
||||
channel = self.bot.get_channel(channel)
|
||||
tmp["action"] += ' in ' + channel.mention
|
||||
|
||||
contains_invite = any(("discord.gg/" in tmp["user"].lower(),
|
||||
"discordapp.com/" in tmp["user"].lower()))
|
||||
if contains_invite:
|
||||
tmp["user"] = tmp["user"].replace(".", "\u200b.")
|
||||
|
||||
case_msg = (
|
||||
"**Case #{case}** | {action}\n"
|
||||
"**User:** {user} ({user_id})\n"
|
||||
|
||||
@@ -2,7 +2,6 @@ import discord
|
||||
from discord.ext import commands
|
||||
from cogs.utils import checks
|
||||
from cogs.utils.converters import GlobalUser
|
||||
from __main__ import set_cog
|
||||
from .utils.dataIO import dataIO
|
||||
from .utils.chat_formatting import pagify, box
|
||||
|
||||
@@ -77,7 +76,7 @@ class Owner:
|
||||
'something went wrong. Check your console '
|
||||
'or logs for more information.')
|
||||
else:
|
||||
set_cog(module, True)
|
||||
self.bot.set_cog(module, True)
|
||||
await self.disable_commands()
|
||||
await self.bot.say("The cog has been loaded.")
|
||||
|
||||
@@ -95,7 +94,7 @@ class Owner:
|
||||
" turn off autoloading at start just in case"
|
||||
" this isn't supposed to happen.")
|
||||
else:
|
||||
set_cog(module, False)
|
||||
self.bot.set_cog(module, False)
|
||||
try: # No matter what we should try to unload it
|
||||
self._unload_cog(module)
|
||||
except OwnerUnloadWithoutReloadError:
|
||||
@@ -115,7 +114,7 @@ class Owner:
|
||||
cogs = self._list_cogs()
|
||||
still_loaded = []
|
||||
for cog in cogs:
|
||||
set_cog(cog, False)
|
||||
self.bot.set_cog(cog, False)
|
||||
try:
|
||||
self._unload_cog(cog)
|
||||
except OwnerUnloadWithoutReloadError:
|
||||
@@ -158,7 +157,7 @@ class Owner:
|
||||
await self.bot.say("That cog could not be loaded. Check your"
|
||||
" console or logs for more information.")
|
||||
else:
|
||||
set_cog(module, True)
|
||||
self.bot.set_cog(module, True)
|
||||
await self.disable_commands()
|
||||
await self.bot.say("The cog has been reloaded.")
|
||||
|
||||
|
||||
@@ -294,9 +294,16 @@ class Streams:
|
||||
@streamset.command()
|
||||
@checks.is_owner()
|
||||
async def twitchtoken(self, token : str):
|
||||
"""Sets the Client-ID for Twitch
|
||||
"""Sets the Client ID for twitch
|
||||
|
||||
https://blog.twitch.tv/client-id-required-for-kraken-api-calls-afbb8e95f843"""
|
||||
To do this, follow these steps:
|
||||
1. Go to this page: https://dev.twitch.tv/dashboard/apps.
|
||||
2. Click 'Register Your Application'
|
||||
3. Enter a name, set the OAuth Redirect URI to 'http://localhost', and
|
||||
select an Application Category of your choosing.
|
||||
4. Click 'Register', and on the following page, copy the Client ID.
|
||||
5. Paste the Client ID into this command. Done!
|
||||
"""
|
||||
self.settings["TWITCH_TOKEN"] = token
|
||||
dataIO.save_json("data/streams/settings.json", self.settings)
|
||||
await self.bot.say('Twitch Client-ID set.')
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
from discord.ext import commands
|
||||
import discord.utils
|
||||
from __main__ import settings
|
||||
|
||||
#
|
||||
# This is a modified version of checks.py, originally made by Rapptz
|
||||
@@ -11,7 +10,7 @@ from __main__ import settings
|
||||
|
||||
def is_owner_check(ctx):
|
||||
_id = ctx.message.author.id
|
||||
return _id == settings.owner or _id in ctx.bot.settings.co_owners
|
||||
return _id == ctx.bot.settings.owner or _id in ctx.bot.settings.co_owners
|
||||
|
||||
def is_owner():
|
||||
return commands.check(is_owner_check)
|
||||
@@ -52,8 +51,8 @@ def role_or_permissions(ctx, check, **perms):
|
||||
def mod_or_permissions(**perms):
|
||||
def predicate(ctx):
|
||||
server = ctx.message.server
|
||||
mod_role = settings.get_server_mod(server).lower()
|
||||
admin_role = settings.get_server_admin(server).lower()
|
||||
mod_role = ctx.bot.settings.get_server_mod(server).lower()
|
||||
admin_role = ctx.bot.settings.get_server_admin(server).lower()
|
||||
return role_or_permissions(ctx, lambda r: r.name.lower() in (mod_role,admin_role), **perms)
|
||||
|
||||
return commands.check(predicate)
|
||||
@@ -61,7 +60,7 @@ def mod_or_permissions(**perms):
|
||||
def admin_or_permissions(**perms):
|
||||
def predicate(ctx):
|
||||
server = ctx.message.server
|
||||
admin_role = settings.get_server_admin(server)
|
||||
admin_role = ctx.bot.settings.get_server_admin(server)
|
||||
return role_or_permissions(ctx, lambda r: r.name.lower() == admin_role.lower(), **perms)
|
||||
|
||||
return commands.check(predicate)
|
||||
|
||||
@@ -16,7 +16,7 @@ In 2015 evidence of water was found on which planet?`Mars
|
||||
Which 'BRIC' country launched the Astrosat space lab in 2015?`India
|
||||
Who won the 2015 men's tennis French Open?`Stan Warwinka`warwinka
|
||||
What company launched the S6 Edge smartphone?`Samsung
|
||||
Which leading professional networking tech corporation, whose main revenue is selling user access/details to recruiters, bought the Lynda learning company for $1.5bn in 2015?`Linkedin`linked in
|
||||
Which leading professional networking tech corporation, whose main revenue is selling user access/details to recruiters, bought the Lynda learning company for $1.5bn in 2015?`LinkedIn`linked in
|
||||
'Dismaland' was the temporary theme park/exhibition of which famous 'anonymous' artist?`Banksy
|
||||
Matthais Muller was made chief of which troubled car company in 2015?`Volkswagen`vw
|
||||
In 2015 the World Anti-Doping Agency suggested banning which nation from the 2016 Olympics?`Russia
|
||||
@@ -38,19 +38,19 @@ What nation hosted the 2015 Women's World (soccer) Cup?`Canada
|
||||
What iconic equine-alluding company, in countless books/films/cowboy holsters, filed for bankruptcy in 2015?`Colt
|
||||
Due to a 2015 contamination scandal in India/Afica, which corporation destroyed 400 million packets of Maggi noodles?`Nestle
|
||||
How many years old was the McDonalds fast food company in 2015?`60`sixty
|
||||
It was announced in 2015 that Alexander Hamilton would be replaced on?`$10 bill`$10`tendollars`ten dollar bill`ten dollar
|
||||
It was announced in 2015 that Alexander Hamilton would be replaced on?`$10 bill`$10`ten dollar bill`ten dollar
|
||||
Name Adele's record-breaking 2015 album?`25
|
||||
What is the year 2015 in Roman numerals?`MMXV
|
||||
'Egoportrait' (a Quebecois word) was added to the 2015 French dictionary, meaning what more popular new English word?`Selfie
|
||||
Who won the men's World Ice Hockey Championship in 2015?`Canada
|
||||
Which country won the men's World Ice Hockey Championship in 2015?`Canada
|
||||
The space transport company launched in 2015 by Jeff Bezos is called?`Blue Origin
|
||||
Published in 2015, Go Set a Watchman, written before her only prior and enduringly popular book of 1960, was written by whom?`Harper Lee
|
||||
Whose 2015 album is 'Purpose'?`Justin Bieber`bieber
|
||||
Which singer's 2015 music album is named 'Purpose'?`Justin Bieber`bieber
|
||||
The 2015 Tour de France began in what country?`The Netherlands`netherlands
|
||||
Which company suffered a major scandal in 2015 for widescale unethical 'inertia' charging for its 'Prime' service?`Amazon
|
||||
Who won the 2015 Superbowl?`New England Patriots`Patriots`the patriots
|
||||
Whose controversial US presidential campaigning greatly increased his popularity within his party in 2015, yet increased party fears that it would unelectable should he lead it?`Donald Trump`trump
|
||||
Name the head of FIFA subject to criminal process in 2015?`Sepp Blatter`blatter
|
||||
Whose controversial US presidential campaigning greatly increased his popularity within his party in 2015, yet increased party fears that it would unelectable should he lead it?`Donald Trump`Trump
|
||||
Name the head of FIFA subject to criminal process in 2015?`Sepp Blatter`Blatter
|
||||
A 2015 study found that what percentage of former American Football players had degenerative brain damage?`ninety-six`96`96%
|
||||
In 2015 Ronda Rousey lost to Holly Holm in what brutal sporting discipline?`UFC`Ultimate Fighting Championship
|
||||
What dating app caused problems for itself in 2015 when increasing its charges?`Tinder
|
||||
@@ -65,11 +65,11 @@ Frank Sinatra would have celebrated which birthday in 2015?`100`hundred
|
||||
Facebook's news service launched in 2015 was called?`Notify
|
||||
On what sprung mechanism did Bristolian Jack Sexty break the world record in 2015 achieving 88,047 bounces in 10hrs 21mins?`Pogo stick
|
||||
Who had the most liked Instagram photo of 2015?`Kendall Jenner
|
||||
Who won the Premier League in 2015?`Chelsea`chelsea f.c.
|
||||
Who won the Premier League in 2015?`Chelsea`chelsea f.c.`Chelsea FC
|
||||
Who won the Rugby World Cup in 2015?`New zealand
|
||||
How many new iPhones were released this year?`2`two
|
||||
"L.A. Love (La La)" is the title of a January 2015 Top Ten Smash hit for which singer?`fergie
|
||||
Microsoft announced which new operating system in January 2015?`windows 10
|
||||
What is the title of the animated superhero Disney film released in January 2015?`big hero 6`big hero six
|
||||
Which singer surpassed Elvis in 2015 in terms of all time US album sales?`garth brooks
|
||||
How many new iPhones were released in 2015?`2`two
|
||||
"L.A. Love (La La)" is the title of a January 2015 Top Ten Smash hit for which singer?`Fergie
|
||||
Microsoft announced which new operating system in January 2015?`Windows 10
|
||||
What is the title of the animated superhero Disney film released in January 2015?`Big Hero 6`big hero six
|
||||
Which singer surpassed Elvis in 2015 in terms of all time US album sales?`Garth Brooks
|
||||
Who remained in the Top 10 of the music charts around the world with the song "Blank Space" in January 2015?`taylor swift
|
||||
@@ -22,7 +22,7 @@ What is the name of the 2015 best-selling book about the Clinton Foundation?`Cli
|
||||
What animal is Blake Lively fighting in 'The Shallows'?`Shark
|
||||
Which author became the first black woman to write for Marvel in 2016?`Roxane Gay
|
||||
What was the name of the hashtag that went viral after Brock Turner's trial?`#thingslongerthanbrockturnerrapes`thingslongerthanbrockturnerrapes
|
||||
How many new original series did Netflix premiere this year?`50`fifty
|
||||
How many new original series did Netflix premiere in 2016?`50`fifty
|
||||
What was Amazon's best-selling book of 2016?`Harry Potter and the Cursed Child
|
||||
What's the name of the rapper at the center of 'Atlanta'?`Paper Boi
|
||||
Who played Apocalypse In 'X-Men: Apocalypse'?`Oscar Isaac
|
||||
@@ -37,7 +37,7 @@ Which singer's merch sold more than $1 million in two days at a single pop-up sh
|
||||
Who was the only woman to host a late-night talk show on network TV in 2016?`Samantha Bee
|
||||
How many medals did U.S. women athletes take at the Rio Olympics?`61
|
||||
How many seasonal red cups did Starbucks introduce for the 2016 holidays?`13`thirteen
|
||||
How many brand new shades of Liptensity lip color did MAC release this year?`24
|
||||
How many brand new shades of Liptensity lip color did MAC release in 2016?`24
|
||||
Which novel won the 2016 National Book Award for fiction?`The Underground Railroad
|
||||
What's Jennifer Lawrence's character's name in 'Passengers'?`Aurora
|
||||
Which book, written by Stephen King's son, won a 2016 Goodreads Choice Award for Best Horror Novel?`The Fireman
|
||||
@@ -74,7 +74,7 @@ Which fruit did Too Faced feature in their most popular eyeshadow palette of 201
|
||||
What was the top Google search for 2016?`Powerball
|
||||
In which month did the U.K. vote to leave the EU?`June
|
||||
In which city did Uber launch self-driving cars?`Pittsburgh
|
||||
How did Hillary Clinton announce that she was running for president?`Youtube
|
||||
How did Hillary Clinton announce that she was running for president?`YouTube
|
||||
Which fast-food brand saw sales tank after an E. coli crisis?`Chipotle
|
||||
Which celebrity interviewed El Chapo for 'Rolling Stone'?`Sean Penn
|
||||
What's Deadpool's real name?`Wade Wilson
|
||||
@@ -141,3 +141,47 @@ In a post-apocalyptic world, Cassie Sullivan will do whatever it takes to find h
|
||||
Where did Chewbacca Mom buy her mask?`Kohl's`Kohls
|
||||
How old was Prince when he passed?`57
|
||||
Which first generation Pokémon wasn't initially able to be caught in 'Pokémon Go,' but has since been added?`Ditto
|
||||
What is 2016 in Roman numerals?`MMXVI
|
||||
On February 12, 2016, Pope Francis and Patriarch Kirill signed an Ecumenical Declaration in the first such meeting between leaders of the Catholic and Russian Orthodox Churches since their split in what year?`1054
|
||||
On March 14 – The ExoMars Trace Gas Orbiter was launched on a mission to what planet?`Mars
|
||||
On March 22 – Three coordinated bombings in what city killed at least 32 and injured at least 250?`Brussels, Belgium`Brussels
|
||||
May 19 – What airline had a flight crash with 66 people on board over the Mediterranean en route from Paris to Cairo?`EgyptAir
|
||||
What was the name of the U.K. referendum to leave the European Union?`Brexit
|
||||
June 1 - Gotthard Base Tunnel, the world's longest and deepest railway tunnel, is opened following two decades of construction work in which country?`Switzerland
|
||||
September 8 – NASA launches OSIRIS-REx, its first asteroid sample return mission. The probe will visit Bennu and is expected to return with samples in what year?`2023
|
||||
September 30 – Two paintings worth $100 million by this artist were recovered.`Vincent Van Gogh`Van gogh`vangogh
|
||||
December 19 - An ambassador from which country is assassinated in Ankara, Turkey?`Russia
|
||||
December 22 – A vaccine is discovered for which deadly virus?`Ebola Virus`Ebola
|
||||
January 14 - This famous English actor and director passed away.`Alan Rickman
|
||||
January 7 - Princess Ashraf of which country passed away?`Iran
|
||||
February 19 - This famous American author who wrote 'To Kill a Mockingbird' passed away.`Harper Lee
|
||||
This American actress and former First Lady of the United States passed away on March 6.`Nancy Reagan
|
||||
On April 2, Amber Rayne, American pornographic actress, passed away at what age?`31
|
||||
April 19 - Patricio Aylwin passed away. He was the 32nd President of what country?`Chile
|
||||
April 23 – Banharn Silpa-archa passed away. He was the 21st Prime Minister of what country?`Thailand
|
||||
May 26 - Arturo Pomar passed away. He was famous for being awarded what title (first Spanish person to be awarded this title)?`Grandmaster
|
||||
June 8 - Qahhor Mahkamov passed away. He was the 1st President of what country?`Tajikistan
|
||||
July 2 - This Romanian-born American, Nobel writer, and political activist passed away. He was especially known for writing 'Night', a book about Auschwitz.`Elie Wiesel`Wiesel
|
||||
September 2 - Islam Karimov passed away. He was the 1st President of which country?`Uzbekistan
|
||||
September 5 - Phyllis Schlafly, American writer and political activist, was what age when she passed away?`92
|
||||
September 16 - Carlo Azeglio Ciampi passed away. He was the 10th President and 49th Prime Minister of what country?`Italy
|
||||
September 25 - This famous American golfer passed away. He was also known for the drink named after him which combines sweet iced tea and lemonade.`Arnold Palmer
|
||||
September 28 - Shimon Peres, 9th President and 8th Prime Minister of Israel, passed away. He was also known for winning which Nobel Prize?`Nobel Peace Prize
|
||||
November 2 - Oleg Popov passed away. What was his profession?`Clown
|
||||
November 25 - This man passed away. He was the 16th Prime Minister and 17th President of Cuba.`Fidel Castro
|
||||
November 18 - Denton Cooley passed away. He was known for performing the first implantation of what?`artificial heart
|
||||
December 13 - Thomas Schelling passed away. He was known for being awarded the Nobel prize in what?`Economic Sciences
|
||||
December 18 - Zsa Zsa Gabor, Hungarian-American actress and socialite, died at what age?`99
|
||||
December 26 – Ashot Anastasian a chess grandmaster from which country passed away?`Armenia
|
||||
December 28 - Gregorio Conrado Álvarez passed away. He was the President of which country?`Uruguay
|
||||
December 27 - This American actress and writer known for her role in the Star Wars francise passed away.`Carrie Fisher
|
||||
Who won the Nobel Peace Prize?`Juan Manuel Santos
|
||||
December 7 - An earthquake claimed around 100 lives in which country?`Indonesia
|
||||
November 8 - What country began to demonetize 500 and 1000 banknotes?`India
|
||||
December 10 - Bombing in what city killed 38 people?`Istanbul
|
||||
In what month did Latvia become the 35th member of the OECD?`July
|
||||
What magnitude was the earthquake that hit Ecuador on April 16 and killed more than 600 people?`7.8
|
||||
A magnitude 6.2 earthquake hit which country on August 25 killing at least 247 people?`Italy
|
||||
What was the name of the Hurricane that hit the Western Atlantic in September and October?`Matthew
|
||||
November 20 - A train derails in what country killing more than 140 people?`India
|
||||
The sixth edition of the ICC World Twenty20 in March was held in what country?`India
|
||||
@@ -20,6 +20,9 @@ What genre of anime covers female to female sexual relationships?`Yuri
|
||||
What genre of anime covers male to male sexual relationships?`Yaoi
|
||||
Which Hayao Miyazaki movie was based off of a book by a British author named Dianna Wynne Jones?`Castle in the sky
|
||||
As of 2015, among all the 17 long anime movies Hayao Miyazaki participated in, how many did he direct?`11`eleven
|
||||
(Angel Sanctuary) Who was the first demon to contact Setsuna?`Kurai
|
||||
(Angel Sanctuary) Who is the first angel that Setsuna meets?`Rosiel
|
||||
(Angel Sanctuary) Which angel is assigned to serve as Setsuna's guardian angel?`Jibril`Gabriel
|
||||
(Attack on Titan) Who is the main character?`Eren Yeager`Eren
|
||||
(Attack on Titan) Which character loves to eat?`Sasha Blouse`Sasha
|
||||
(Attack on Titan) What is the outer wall named (The one taken by the titans)?`Wall Maria`Maria
|
||||
@@ -27,7 +30,7 @@ As of 2015, among all the 17 long anime movies Hayao Miyazaki participated in, h
|
||||
(Attack on Titan) What color flare is used when the mission is over whether or nor it was a success?`Yellow
|
||||
(Attack on Titan) Who killed Rod Reiss?`Historia
|
||||
(Attack on Titan) What was the name of Levi's mother?`Kuchel
|
||||
(Attack on Titan) Who taught Annie how to fight?`Her father`Father
|
||||
(Attack on Titan) Who taught Annie how to fight?`Her father`Father`Mr. Leonhart`mr leonhart
|
||||
(Attack on Titan) What was the name of Historia's mother?`Alma
|
||||
(Attack on Titan) What protects the Colossal titan?`Steam
|
||||
(Attack on Titan) What is the name of the wall in Wall Sina's northern district?`Orvud
|
||||
@@ -38,21 +41,23 @@ As of 2015, among all the 17 long anime movies Hayao Miyazaki participated in, h
|
||||
(Attack on Titan) What did Carla do for a living before she met Grisha?`waitress
|
||||
(Attack on Titan) "I just don't want those charred bones I saw to be disappointed in me. I... I know what I have to do now." Who said this?`Jean
|
||||
(Attack on Titan) Who would become the commander of the Scouting Legion if something were to happen to Erwin?`Hange
|
||||
(Beserk) When you first are introduced to the main character, Guts, he refers to himself by what name?`The Black Swordsman`Black Swordsman
|
||||
(Beyblade) What is the name of Emily's bitbeast?`Trygator
|
||||
English name of Kuroshitsuji?`Black Butler
|
||||
(Black Butler) Who is the British monarch in Black Butler's time period?`Victoria I`Queen Victoria I
|
||||
(Black Butler) Which character is the head of the Phantomhive household?`Ciel Phantomhive`Ciel
|
||||
(Black Cat) How many members of Chronos were there originally?`13`thirteen
|
||||
(Black Cat) Out of which material are Train Heartnet's gun and bullets mainly made of?`orichalcum
|
||||
(Black Cat) Who is the main character?`Train Heartnet
|
||||
Which series features a location called the Soul Society?`Bleach
|
||||
(Bleach) How many times have Ichigo and Renji battled?`2`two
|
||||
(Bleach) What squad is Toushiro Hitsugaya the captain of?`10`10th`tenth`ten
|
||||
(Bleach) Human mediums, having the ability to detect the existence of Hollows?`Quincy
|
||||
(Bleach) What are human mediums who have the ability to detect the existence of Hollows called?`Quincy
|
||||
(Bleach) What is a Hollow that has removed its mask and has gained Shinigami-like powers?`Arrancar
|
||||
(Bleach) What is the name of Hitsugaya Toshirou's Zanpakutou?`Hyourinmaru
|
||||
(Bleach) Who does Orikasa Fumiko voice?`Rukia
|
||||
(Bleach) Who are Shinigami who have obtained Hollow powers?`Visored
|
||||
(Bleach) Who are the top ranked Arrancar?`Espada
|
||||
(Bleach) What are the top ranked Arrancar called?`Espada
|
||||
(Bleach) What is the name of Orihime's power which is manifested through her hairpins?`Shun Shun Rikka
|
||||
(Bleach) What is the name of Urahara's Zanpakutou?`Benihime
|
||||
(Bleach) What is the name of Ichigo's Zanpakutou?`Zangetsu
|
||||
@@ -60,6 +65,7 @@ Which series features a location called the Soul Society?`Bleach
|
||||
(Bleach) Jigokucho which are used as messengers in Soul Society are what type of animal?`Butterfly
|
||||
(Bleach) What are the artificial bodies used by Shinigami in the World of the Living?`Gigai
|
||||
(Bleach) What is the name of Karin's twin?`Yuzu
|
||||
(Blue Exorcist) What is the name of Rin Okumura's twin brother?`Yukio Okumura`Yukio
|
||||
In what CLAMP anime is there a little Persocon named Chii?`Chobits
|
||||
(Chobits) What is the first thing that came on the screen in episode 1?`cow
|
||||
(Code Geass) The character Li Xingke is a member of which group?`the chinese federation`chinese federation
|
||||
@@ -111,6 +117,7 @@ In what CLAMP anime is there a little Persocon named Chii?`Chobits
|
||||
(Cowboy Bebop) What is the villan Vicious's weapon of choice?`katana
|
||||
(Cowboy Bebop) Who dies?`Spike
|
||||
Which anime involves a Corgi hound named Ein as one of the characters?`cowboy bebop
|
||||
(Crimson Hero) Who is the first girl to join Nobara as she tries to form a volleyball team?`Ayako Mochida`Ayako
|
||||
(Death Note) Who is the second Kira?`Misa Amane`misa
|
||||
(Death Note) Who is the first Kira?`Light Yagami`Light
|
||||
(Death Note) Who is the third Kira?`Kyosuke Higuchi`Kyosuke
|
||||
@@ -132,9 +139,13 @@ Which anime involves a Corgi hound named Ein as one of the characters?`cowboy be
|
||||
(Death Note) What does L hate?`Socks
|
||||
(Death Note) What is the character Mello (Mihael Keehl) addicted to eating?`Chocolate
|
||||
(Death Note) If L sits normally, he claims his deductive reasoning reasoning will drop by what percent?`40`Forty
|
||||
(Demon Diary) Who is the current Demon Lord in the series?`Raenef V
|
||||
(Demon Diary) Who is Raenef's demon tutor?`Eclipse
|
||||
(Detective Conan) What is Shinichi Kudo's best sport?`soccer`football
|
||||
(Detective Conan) Who is Tooru Amuro?`Bourbon`Rei Furuya
|
||||
(Digimon) Which year was the American adaptation of Digimon: The Movie released?`2000
|
||||
(Digimon) What was Taichi Kamiya's first Digimon?`Botamon
|
||||
(Doubt) At the end, who was is actual wolf?`Rei Hazama`Rei
|
||||
(Dragon Ball Z) How many dragon balls are there?`7`seven
|
||||
(Dragon Ball Z) Who does a complete set of dragon balls summon?`Shenron
|
||||
(Dragon Ball Z) What race is Piccolo?`Namekian`Nameks
|
||||
@@ -223,10 +234,14 @@ For which anime were these songs written: "Cha La Head Cha La" and "Boku-tachi w
|
||||
After Watase Yuu's creation of "Fushigi Yuugi", which famous shoujo anime did she make?`Ayashi no Ceres
|
||||
(Fushigi Yuugi) Miaka is the priestess of what?`Suzaku
|
||||
(Fushigi Yuugi) The world of Fushigi Yuugi is based on the ancient form of what country?`China
|
||||
(Fushigi Yuugi: Genbu Kaiden) After being sucked into the book, who is the first person Takiko meets?`Female Uruki`Uruki
|
||||
(Gakuen Alice) What color is Mikan's Alice stone?`Mandarin orange
|
||||
(Gundam) How many rounds of ammunition does Gundam Wing Zero Custom's Buster Rifle have?`3`three
|
||||
(Gundam) What is the original Gundam?`RX-78
|
||||
(Gundam) What is the name of the final Gundam used by Shiro in 08th MS Team?`Ez-8
|
||||
(Hellsing) What country does it take place in?`England
|
||||
(Hellsing) What country does the series take place in?`England
|
||||
(Hellsing) What is the name of Alucard's silver gun?`Hellsing ARMS .454 Casull Auto`Casull`.454 Casull Auto
|
||||
(Hellsing) What is the name of Alucard's black gun?`Hellsing ARMS 13mm Auto Anti-Freak Combat Pistol: Jackal`Jackal`Hellsing ARMS 13mm Auto Anti-Freak Combat Pistol Jackal`13mm Auto Anti-Freak Combat Pistol: Jackal
|
||||
(Hetalia) Who did America grow up with?`England
|
||||
(Hetalia) Who does Holy Rome have a crush on?`Italy
|
||||
(Highschool Of The Dead) What are zombie's sensitive to?`sound
|
||||
@@ -237,11 +252,18 @@ After Watase Yuu's creation of "Fushigi Yuugi", which famous shoujo anime did sh
|
||||
(InuYasha) Inuyasha's sword is called what?`Tessaiga`Tetsusaiga
|
||||
(InuYasha) What is the name of the baby that Naraku holds his human heart in?`Hakudoshi
|
||||
(InuYasha) Who does Inuyasha mistake Kagome for?`Kikyo
|
||||
(Kamikaze Kaito Jeanne) Who is the new student who moves next door to Maron?`Chiaki
|
||||
(Kekkaishi) What are the demons/yokai of the series called?`Ayakashi
|
||||
(Kodomo no Omocha) How old are Sana and her friends at the start of the series?`11`Eleven
|
||||
Basketball Anime that came out in 2012?`Kuroko No Basket
|
||||
(Love Hina) What was the samurai girl's name?`Aoyama `Aoyama Motoko
|
||||
(Love Hina) In the Christmas special, what did Keitarou buy Naru?`Coat`jacket
|
||||
(Love Hina) At the beginning of the series, how many times has Keitaro failed the Tokyo University entrance exam?`2`Two
|
||||
(Love Stage!!) Izumi Sena, the main protagonist, is a college student and the youngest child of a family in the entertainment industry. Unlike his family, Izumi does not want to go into show business. What does he dream of becoming instead?`mangaka`manga artist`manga author
|
||||
(Magic Knight Rayearth) Thee three heroines, Hikaru, Umi and Fuu, have powers associated with different elements. What kind of elemental spells does Umi use?`water
|
||||
(Mew Mew Power) What type of animal power does Kiki have?`monkey
|
||||
(Mamotte! Lollipop) Who is the main protagonist?`Nina Yamada`Nina
|
||||
(Mamotte! Lollipop) Which wizard in training is forced to cross-dress on several occasions by his teammate?`Forte
|
||||
(Midnight Secretary) Who is the main female character?`Kaya Satozuka`Kaya
|
||||
(Naruto) What is the relationship between Hinata and Hanabi Hyuga?`sisters`sister
|
||||
(Naruto) Who is Negi's cousin?`Hinata Hyuga`Hinata
|
||||
Sakura, Sasuke, Rock Lee, and Kakashi are all characters from which anime?`Naruto
|
||||
@@ -411,6 +433,7 @@ Sakura, Sasuke, Rock Lee, and Kakashi are all characters from which anime?`Narut
|
||||
(One Punch Man) Who is the leader of the Monster Association?`Psykos
|
||||
(One Punch Man) What is Dr. Bofoi's hero name?`Metal Knight
|
||||
(Ouran High School Host Club) Who is mistaken for a boy in the anime?`Haruhi
|
||||
(Ouran High School Host Club) Where is the host club located?`Music Room #3`Music Room 3`Third Music Room`3rd Music Room
|
||||
(Pokemon) In the original Japanese version, what is Ash Ketchum's name?`Satoshi
|
||||
(Pokemon) Pokemon was created by Stoshi Tajiri in which year?`1996
|
||||
(Pokemon) What starter pokemon did Ash Ketchum originally intend to choose?`Squirtle
|
||||
@@ -436,6 +459,8 @@ Which 2011 magical girl anime features Grief Seeds, witches, a mysterious white
|
||||
(Rave Master) Who is a known pervert?`Griffon Kato`Griffon
|
||||
(Rave Master) What is Haru's last name?`Glory
|
||||
(Rave Master) What was Elie's old name?`Resha
|
||||
(Rave Master) What is the name of Haru's sword?`Ten Commandments
|
||||
(Rave Master) Who was the Rave Master before Haru?`Shiba
|
||||
(Rurouni Kenshin) What is the name of the principle of "swords that give life"?`katsujinken
|
||||
(Rurouni Kenshin) What is the name of the principle of "swords that kill"?`satsujinken
|
||||
What was the other name of the popular anime known as Samurai X?`Rurouni Kenshin
|
||||
@@ -456,6 +481,7 @@ What was the other name of the popular anime known as Samurai X?`Rurouni Kenshin
|
||||
(Rurouni Kenshin) What was Yahiko before he was rescued?`Pickpocket
|
||||
(Rurouni Kenshin) What is the name of Kenshin's sword style?`Hiten Mitsurugi
|
||||
(Rurouni Kenshin) What is the name of Kenshin's master?`Hiko
|
||||
(Rurouni Kenshin) What is Sanosuke's last name?`Sagara`Higashidani
|
||||
Usagi Tsukino is better known as...?`Sailor Moon
|
||||
(Sailor Moon) Who was Minako's crime-fighting alter ego before she became Sailor Venus?`sailor v
|
||||
(Sailor Moon) What are the Sailor Senshi named after?`Planets
|
||||
@@ -465,6 +491,7 @@ What anime is about samurai swordsmen in a hip hop setting?`Samurai Champloo
|
||||
(Samurai Champloo) What is the name of Fuu's flying squirrel?`Momo
|
||||
(Samurai Champloo) What is Mugen's totem?`Rooster
|
||||
(Samurai Champloo) What is Jin's totem?`Koi Fish`Koi
|
||||
(Shinshi Doumei Kurosu) Who is the main female character?`Haine Otomiya`Haine
|
||||
(Shokugeki no Soma) Who is the 7th seat on the Elite Ten Council?`Satoshi Isshiki`Isshiki
|
||||
(Shokugeki no Soma) Who is the 10th seat on the Elite Ten Council?`Erina Nakiri`Erina
|
||||
(Shokugeki no Soma) What was Joichiro Yukihira's original name?`Joichiro Saiba`Saiba Joichiro`Saiba
|
||||
@@ -495,11 +522,15 @@ Maka Albarn is from what anime?`soul eater
|
||||
(Sword Art Online) What is the second game Kirito goes into?`Alfheim Online`Alfheim
|
||||
(The Last Airbender) What is the name of Aang's flying bison?`Appa
|
||||
(The Last Airbender) What is the name of the evil prince that tries to capture Aang?`prince zuko`zuko
|
||||
(Tokyo Mew Mew) Who was the Blue Knight?`Masaya
|
||||
(Tokyo Mew Mew) What type of animal power does Bu-Ling have?`Golden Lion Tamarin
|
||||
(Trigun) What was Vash's brother called?`Knife
|
||||
Sakura Kinamoto is the heroine of 'Cardcaptor Sakura'. In which CLAMP manga/anime does she also appear?`Tsubasa: Reservoir Chronicle`Tsubasa`Tsubasa Reservoir Chronicle`Tsubasa - Reservoir Chronicle
|
||||
(Tsubasa Chronicle) What does the gang needed to collect?`Princess Sakura's feathers`feathers
|
||||
Which manga made by CLAMP was named after a plant?`clover
|
||||
What is name for the rabbit-like creatures from CLAMP?`mokona
|
||||
What is the one CLAMP manga that does not crossover with 'Tsubasa: Reservoir Chronicles'?`Wish
|
||||
(Ultra Maniac) What is the name of the main character who is also a witch?`Nina Sakura`Nina
|
||||
What is Kazuki Takahashi best known as the creator of?`yu-gi-oh`yu-gi-oh!
|
||||
(Yu Yu Hakusho) What level computer does Mitari have to fight in Game Master's territory?`7`seven
|
||||
(Yu Yu Hakasho) What is Yuskey's close advisor and ghost friend?`Botan
|
||||
|
||||
@@ -32,7 +32,7 @@ What car is this? http://i.imgur.com/F1dO1Zv.jpg`Jeep Wrangler`Wrangler
|
||||
What car is this? http://i.imgur.com/00lgfBA.jpg`Hummer H3`H3
|
||||
What car is this? http://i.imgur.com/sScLnok.jpg`BMW Z4`Z4
|
||||
What car is this? http://i.imgur.com/ehK34nf.jpg`BMW X5`X5
|
||||
What car is this? http://i.imgur.com/Mo38uCR.jpg`Renult Clio`Clio
|
||||
What car is this? http://i.imgur.com/Mo38uCR.jpg`Renault Clio`Clio
|
||||
What car is this? http://i.imgur.com/Khv7UOz.jpg`Peugeot RCZ`RCZ
|
||||
What car is this? http://i.imgur.com/ZRW6msa.jpg`Audi TT`TT
|
||||
What car is this? http://i.imgur.com/yUzmtGU.jpg`Toyota Landcruiser`Landcruiser
|
||||
|
||||
@@ -80,7 +80,7 @@ Social and visual discovery tool, founded by Ben Silbermann, Evan Sharp and Paul
|
||||
Crowdfunding platform founded in 2009 by Perry Chen, Yancey Strickler and Charles Adler?`Kickstarter
|
||||
Provider of on-demand Internet streaming media since 1997. Started its own original programming in 2011 with the series House of Cards?`Netflix
|
||||
Business-oriented social networking service, co-founded by Reid Hoffman in 2003?`LinkedIn
|
||||
Internet domain registrar and web hosting company, founded by Bob Parsons in 1997?`Go Daddy
|
||||
Internet domain registrar and web hosting company, founded by Bob Parsons in 1997?`Go Daddy`GoDaddy
|
||||
Social networking service co-founded by Mark Zuckerberg in 2004?`Facebook
|
||||
E-commerce business founded in 1998 and focuses on money transfers to be made through the Internet?`PayPal
|
||||
Quattro Pro, Paradox and Trellix are part of which office suite?`Corel WordPerfect
|
||||
|
||||
@@ -116,3 +116,24 @@ What is the element symbol of "Fermium"?`Fm
|
||||
What is the element symbol of "Mendelevium"?`Md
|
||||
What is the element symbol of "Nobelium"?`No
|
||||
What is the element symbol of "Lawrencium"?`Lr
|
||||
What element is the heaviest of the naturally-occurring Noble gases?`Radon
|
||||
What is the atomic number of Hydrogen?`1`One
|
||||
What is the atomic number of Boron?`5`Five
|
||||
The name of heaviest element with a one letter atomic symbol is`Uranium
|
||||
Which of these 4 elements (Nitrogen, Boron, Helium, Chlorine) is the most reactive?`Chlorine
|
||||
What is the lightest element with an atomic symbol that is not related to its English name?`Sodium
|
||||
What was the first element to be produced artificially?`Technetium
|
||||
What element is the most electronegative and reactive of all elements?`Fluorine
|
||||
What is the least reactive element of these four? (Fluorine, Carbon, Magnesium, Neon)`Neon
|
||||
What element's three isotopes have different names?`Hydrogen
|
||||
What element is found in diamonds?`Carbon
|
||||
What element is named after Copenhagen, Denmark?`Hafnium
|
||||
Which element has close to 10,000,000 known compounds?`Carbon
|
||||
The most abundant element in the human body (by weight) is`Oxygen
|
||||
Mendeleev's periodic table organized the elements in order of`increasing atomic weight
|
||||
Although heavier elements exist in stars, the heaviest element that may be produced by fusion in a star is`Iron
|
||||
The color of molten sulfur is`Red
|
||||
What color does white phosphorus glow when oxidizing in air?`Green
|
||||
What is the lightest metallic element which floats on water?`Lithium
|
||||
The only element in the halide family that is a liquid at room temperature and pressure is`Bromine
|
||||
The most common isotope of hydrogen has no neutrons. True or False?`True
|
||||
@@ -165,7 +165,7 @@ What is the official birthplace of country music?`Bristol
|
||||
Who wrote the song 'Do They Know It's Christmas' with Midge Ure?`Bob Geldof
|
||||
What instrument does Woody Allen play?`Clarinet
|
||||
Term meaning 'to gradually decrease in volume'?`Decrescendo
|
||||
He wrote the operas "The Magic Flute" and "The Marriage of Figaro"?`Wolfgang Amadeus Mozart
|
||||
He wrote the operas "The Magic Flute" and "The Marriage of Figaro"?`Wolfgang Amadeus Mozart`Mozart
|
||||
In 'La Traviata', who sings 'Sempre Libera'?`Violetta
|
||||
What do the initials B.B. stand for in B.B. King's name?`Blues Boy
|
||||
Name the musical film named after a state?`Oklahoma
|
||||
@@ -184,7 +184,7 @@ Where does young Anakin Skywalker come from?`Tatooine
|
||||
Who was Dick Dastardley's pet?`Muttley
|
||||
What actress has received the most Oscar nominations?`Katherine Hepburn
|
||||
Who sang 'In The Air Tonight'?`Phil Collins
|
||||
Which of Beethoven's symphonies was the legendary "Incomplete"?`The 9th Symphony`9th`9
|
||||
Which of Beethoven's symphonies was the legendary "Incomplete"?`The 10th Symphony`10th`10
|
||||
Name the band: songs include "Let's Stick Together, The Price of Love"?`Bryan Ferry
|
||||
What is the name given to the type of West Indian music made famous by artists such as Bob Marley and Peter Tosh?`Reggae
|
||||
In the film 'American Hot Wax', who played the 'Mookie'?`Jay Leno
|
||||
@@ -294,7 +294,7 @@ Name the band: songs include "Doctor Doctor, Hold Me Now, Don't Mess With Dr Dre
|
||||
Who sang 'All Right Now'?`Free
|
||||
Country singer Vince ____?`Gill
|
||||
What is Hawkeye's full name in M.A.S.H.?`Benjamin Franklin Pierce
|
||||
How many symphonies did Beethoven complete?`Eight`8
|
||||
How many symphonies did Beethoven complete?`Nine`9
|
||||
What is Peter Parker's secret identity?`Spiderman
|
||||
Before being married to Pamela Anderson what other famous actress was Tommy Lee married to?`Heather Locklear
|
||||
Who is the autor of the song 'Blue Suede Shoes'?`Carl Perkins
|
||||
@@ -501,7 +501,7 @@ Juliette Binoche won an academy award for best supporting role in which film?`En
|
||||
Who runs Andy Capp's favorite pub?`Jack and Jill
|
||||
What was the first film directed by Robert Redford?`Ordinary People
|
||||
What was the first cartoon character called?`Oswald the Rabbit
|
||||
What composer was working on his 10th symphony at the time of his death?`Ludwig van Beethoven`Beethoven
|
||||
What famous composer was working on his 10th symphony at the time of his death?`Ludwig van Beethoven`Beethoven
|
||||
Popeye's chief adversary has two names, Bluto and ______?`Brutus
|
||||
What did Hannibal Lecter like to eat with liver?`Fava Beans
|
||||
Who was 'hooked on a feeling'?`Blue Suede
|
||||
|
||||
@@ -675,3 +675,37 @@ A Muscovite refers to a native of what city?`Moscow
|
||||
What famous ancient city is on the river Tiber?`Rome
|
||||
A prebiotic induces growth in humans (and other living hosts) of beneficial...?`bacteria
|
||||
The CAC40 is a main stock market index of which country?`France
|
||||
Who invented the telephone?`Alexander Graham Bell`Bell
|
||||
What temperature does water boil at (in Celsius)?`100 degrees`100`100C
|
||||
Name the largest freshwater lake in the world by surface area?`Lake Superior
|
||||
Where would you find the Sea of Tranquility?`Moon`The Moon
|
||||
What is someone who shoes horses called?`Farrier
|
||||
What item of clothing was named after its Scottish inventor?`Mackintosh
|
||||
What kind of weapon is a falchion?`Sword`A Sword
|
||||
Which word goes before vest, beans and quartet?`String
|
||||
Name the seventh planet from the sun.`Uranus
|
||||
Who invented the rabies vaccination?`Louis Pasteur
|
||||
What colour jersey is worn by the winners of each stage of the Tour De France?`Yellow
|
||||
Name the only heavyweight boxing champion to finish his career of 49 fights without ever having been defeated?`Rocky Marciano
|
||||
Which sport does Constantino Rocca play?`Golf
|
||||
Name the country where you would find the Cresta Run.`Switzerland
|
||||
What is the oldest surviving printed book in the world?`The Diamond Sutra
|
||||
In publishing, what does POD mean?`Print on demand
|
||||
Name the author of "On Her Majesty's Secret Service", "Dr. No", and "Thunderball".`Ian Fleming
|
||||
Which Shakespeare play features Shylock?`The Merchant of Venice
|
||||
Who wrote the novel Death in Venice, which was later made into a film of the same name?`Thomas Mann
|
||||
Who wrote the Vampire Chronicles, which include the novels "Armand", "Blood and Gold", and "Interview with the Vampire"?`Anne Rice
|
||||
How tall would a double elephant folio book be in inches?`50`50 inches
|
||||
Who wrote the contemporary children's books about mermaids set on the coast of Cornwall?`Helen Dunmore
|
||||
How old is the world's oldest dictionary?`2300 BCE`2300 BC`2300BCE`2300BC
|
||||
How many times was the Men's Tennis Singles at Wimbledon won by Bjorn Borg?`Five`5
|
||||
In 2011, which country hosted a Formula 1 race for the first time?`India
|
||||
Name the game played on a lawn called a 'bowling green'.`Bowls
|
||||
Which chess piece can only move diagonally?`Bishop
|
||||
Name the only footballer to have played for Liverpool, Everton, Manchester City and Manchester United.`Peter Beardsley
|
||||
In football, who was nicknamed 'The Divine Ponytail'?`Roberto Baggio
|
||||
If you had Lafite-Rothschild on your dinner table, what would it be?`Wine
|
||||
What is the Japnese word for the seaweed sushi is often wrapped in?`Nori
|
||||
May Queen, Wisley Crab, Foxwhelps and Lane's Prince Albert are all species of what?`Apples`Apple
|
||||
What is allspice alternatively known as?`Pimenta
|
||||
What colour is Absynthe?`Green
|
||||
@@ -29,11 +29,14 @@ Who says "I shall endure." while attacking?`Anivia
|
||||
Whose name is derived from a Latin word meaning "snow white"?`Anivia
|
||||
Who froze Gnar?`Anivia
|
||||
Who has a skill called "Crystallize"?`Anivia
|
||||
Who is from the Voodoo Lands?`Annie
|
||||
What is Annie's last name?`Hastur
|
||||
Who has the skill with the largest AP ratio?`Annie
|
||||
Who is known as "The Dark Child"?`Annie
|
||||
Who has a skill called "Molten Shield"?`Annie or Tibbers`Annie`Tibbers
|
||||
Who is part of the faction "the Grey Order"?`Annie
|
||||
What is the name of Annie's step-sister?`Daisy
|
||||
Who is Gregori the Gray's daughter?`Annie
|
||||
Who made Tibbers?`Amoline
|
||||
What is Annie's passive skill named?`Pyromania
|
||||
Who is Avarosa' descendant?`Ashe
|
||||
Who is the champion in the tutorial?`Ashe
|
||||
Who says "I only need one shot!" while attacking?`Ashe
|
||||
@@ -79,6 +82,7 @@ What is Camille's last name?`Ferros
|
||||
Whose family motto is "For family, I will give."?`Camille
|
||||
Who says "Precision is the difference between a butcher and a surgeon." when picked?`Camille
|
||||
Who does Cassiopeia betray?`Sivir
|
||||
What is the name of Cassiopeia and Katarina's father?`Marcus
|
||||
The Mythic Cassiopeia skin was released to celebrate the release of the server for which country?`Greece`Greek
|
||||
Who has a skill called "Miasma"?`Cassiopeia
|
||||
Who releases Renekton and Xerath?`Cassiopeia
|
||||
@@ -98,6 +102,7 @@ Who is Darius' brother?`Draven
|
||||
Between "The Blood Brothers", who is older?`Darius
|
||||
Who is the "Hand of Noxus"?`Darius
|
||||
Who says "I do not tolerate cowardice."?`Darius
|
||||
Who is the Trifarix Leader of Might?`Darius
|
||||
Which faction did Diana belong to?`Lunari
|
||||
Who says "Bring down the sun."?`Diana
|
||||
Who has a Lunar Goddess skin?`Diana
|
||||
@@ -196,10 +201,13 @@ Who created Master Yi's goggles?`Heimerdinger
|
||||
Who gets the buff Eureka! when they get a pentakill?`Heimerdinger
|
||||
Who has a Hazmat skin?`Heimerdinger
|
||||
Who is known as the "Revered Inventor"?`Heimerdinger
|
||||
If you were to destroy this champion's blades, he/she would die (according to lore)?`Irelia
|
||||
Who has the highest potential tenacity in the game?`Irelia
|
||||
Who is known as the "Will of the Blades"?`Irelia
|
||||
Who says "This battle will be won."?`Irelia
|
||||
If you were to destroy this champion's blades, he/she would die (according to old lore)?`Irelia
|
||||
Who was known as the "Will of the Blades"?`Irelia
|
||||
Who cut off Swain's hand?`Irelia
|
||||
Who was a silk dancer?`Irelia
|
||||
What is Irelia's family name?`Xan
|
||||
What is the range of Irelia's Bladesurge?`625
|
||||
What is Irelia's father's name?`Lito
|
||||
Name one of the champions that has the Mantle of Decorum?`Irelia or Karma`Irelia`Karma
|
||||
Who cannot damage any non-epic neutral monsters?`Ivern
|
||||
What is the name of Ivern's summoned sentinel?`Daisy
|
||||
@@ -240,6 +248,11 @@ What is the name of Star Guardian Jinx's white gun?`Shiro
|
||||
What is the name of Star Guardian Jinx's black gun?`Kuro
|
||||
Who has a Firecracker skin?`Jinx
|
||||
Who used to have a crush on Jinx before she went crazy?`Ekko
|
||||
Who was the first champion to be released with Chroma variants?`Kai'sa`Kai sa`kaisa
|
||||
Who is Kassadin's daughter?`Kai'sa`Kaisa`Kai sa
|
||||
What type of food does Kai'sa prefer to eat?`Peaches`Peach
|
||||
What is Kai'sa's original name?`Kaisa
|
||||
Which of Kai'sa's stats is upgrading her Supercharge dependent on?`Bonus Attack Speed`attack speed
|
||||
Who is related to the Ruined King (Blade of the Ruined King)?`Kalista
|
||||
Who has the skill with the highest AD ratio in the game?`Kalista
|
||||
Name one of the two champions whose dance is a reference to Game of Thrones?`Kalista or Riven`Kalista`Riven
|
||||
@@ -257,10 +270,10 @@ Who does Karthus follow (in a worshipping manner)?`Kindred
|
||||
Who has a Phantom skin?`Karthus
|
||||
Who has a skill called "Void Stone"?`Kassadin
|
||||
Who has followers called "The Preservers of Valoran"?`Kassadin
|
||||
Who is trying to protect Valoran from the Void?`Kassadin
|
||||
Who captured Kassadin's daughter?`Malzahar
|
||||
How many degrees is the angle of Kassadin's Force Pulse?`80
|
||||
Who caused Kassadin to lose his daughter?`Malzahar
|
||||
Who says "You are null and void."?`Kassadin
|
||||
Who is Katarina's sister?`Cassiopeia
|
||||
Who is Katarina's younger sister?`Cassiopeia
|
||||
Who is the head of the Du Couteau House?`Katarina
|
||||
Who does Katarina treat as an emotional punching bag?`Talon
|
||||
Who has a Red Card skin?`Katarina
|
||||
@@ -285,7 +298,7 @@ Who is known as the "Voidreaver"?`Kha'zix`Khazix`kha zix
|
||||
Who has a skill called "Leap"?`Kha'zix`Khazix`kha zix
|
||||
Who is Kha'zix's rival?`Rengar
|
||||
Who says "change is good"?`Kha'zix`khazix`kha zix
|
||||
Who is the only Voidborn champion without a True Damage component to their skillset?`Kha'zix`Khazix`kha zix
|
||||
What species is Kha'zix?`Voidborn
|
||||
Who is part of the Spirits species?`Kindred
|
||||
Aside from Kindred, who else's champion design is based on the idea of "Yin and Yang"?`Karma
|
||||
Who has a Shadowfire skin?`Kindred
|
||||
@@ -302,12 +315,13 @@ Who has a Reindeer skin?`Kog'maw`kogmaw`Kog maw
|
||||
Who is the "Mouth of the Abyss"?`Kog'maw`kogmaw`Kog maw
|
||||
Who has an ability called "Icathian Surprise"?`Kog'maw`kogmaw`Kog maw
|
||||
Whose dance is based on the Michigan J. Frog dance?`Kog'maw`kogmaw`Kog maw
|
||||
Who says "Time to make an appearance."?`Leblanc
|
||||
Whose name means "The White" in French?`Leblanc
|
||||
Whose real name is Evaine?`Leblanc
|
||||
Who is hunting Leblanc?`Kalista
|
||||
Whose passive makes them stealth for 1 second?`Leblanc
|
||||
What did Lee Sin want to become before he became a monk?`summoner
|
||||
Who says "Time to make an appearance."?`LeBlanc
|
||||
Whose name means "The White" in French?`LeBlanc
|
||||
Whose real name is Evaine?`LeBlanc
|
||||
Who is hunting LeBlanc?`Kalista
|
||||
Which champion shares a voice actress with Lux?`LeBlanc
|
||||
What is the name of the faction led by LeBlanc?`The Black Rose
|
||||
What did Lee Sin want to become before he became a monk?`Summoner
|
||||
Who lit themselves on fire to protest Noxus?`Lee Sin`leesin
|
||||
Who says "Their heartbeats quicken."?`Lee Sin`leesin
|
||||
Who has a passive skill called "Flurry"?`Lee Sin`leesin
|
||||
@@ -320,6 +334,7 @@ What faction is Leona a part of?`The Solari`Solari
|
||||
Who is the Aspect of the Sun?`Leona
|
||||
What species is Lissandra?`Iceborn
|
||||
Who lives in the Frostguard Citadel?`Lissandra
|
||||
Who turned Lissandra into an Iceborn?`Watchers
|
||||
Aside from Lee Sin, who else is blind?`Lissandra
|
||||
Who has the only in-game monologue?`Lissandra
|
||||
Who is the only champion in game to have a target skill that can be self-cast but not ally-cast?`Lissandra
|
||||
@@ -340,11 +355,15 @@ Who was the original Star Guardian?`Lux
|
||||
Who is the only female with a commando skin?`Lux
|
||||
Who is Lux supposedly dating?`Ezreal
|
||||
Whose ult was originally named "Finales Funkeln"?`Lux
|
||||
Who has a skin that is a reference to the anime Sailor Moon?`Lux
|
||||
Who is allied with Maokai?`Malphite
|
||||
Who has a skill called "Brutal Strikes"?`Malphite
|
||||
Who has the only skill in the game that does AD but scales with AP (and armor)?`Malphite
|
||||
Who says "I'm moving as fast as I can." in game?`Malphite
|
||||
Who is known as the "Prophet of the Void"?`Malzahar
|
||||
What is the name of the faction led by Malzahar?`The Cult of the Void`Cult of the void
|
||||
What is Malzahar's pet champion called?`Voidling
|
||||
Who did Malzahar lure into Runeterra?`Kog'maw`kog maw`kogmaw
|
||||
Who says "We demand sacrifice."?`Malzahar
|
||||
What species is Maokai?`Treant
|
||||
Who has the highest base AD at level 1?`Maokai
|
||||
Whose name is an anagram of "I am Oak"?`Maokai
|
||||
@@ -476,7 +495,7 @@ Who is also known as the "Rune Mage"?`Ryze
|
||||
Who used to be known as the "Rogue Mage"?`Ryze
|
||||
Who was the first champion to have 2 Harrowing skins?`Ryze
|
||||
Who tells you to "Take this scroll and stick it somewhere safe."?`Ryze
|
||||
Whose occupation is Warlock?`Ryze
|
||||
Who has an ultimate ability that can only be ranked up twice?`Ryze
|
||||
Who was the first champion to have 9 skins?`Ryze
|
||||
Who has a skin that is a reference to Elminster Aumar from Dungeons and Dragons?`Ryze Whitebeard`Ryze
|
||||
What is the name of Sejuani's boar?`Bristle
|
||||
@@ -519,7 +538,7 @@ Who is the Heir of Shurima?`Sivir
|
||||
Who has a skill called "Ricochet"?Sivir
|
||||
Who is also known as "The Crystal Vanguard"?`Skarner
|
||||
Who emerged from the Crystal Scar (Dominion map)?`Skarner
|
||||
Which champion is a member of the Brackerns species?`Skarner
|
||||
Which champion is a member of the Brackern species?`Skarner
|
||||
Who yells his own name after standing in a bush for a period of time (reference to Pokemon)?`Skarner
|
||||
Who has a skill called "Fracture"?`Skarner
|
||||
Who says "On all legs." in game?`Skarner
|
||||
@@ -535,10 +554,11 @@ Who says "This is my path" in game?`Soraka
|
||||
Who has a Dryad skin?`Soraka
|
||||
Who has a skill called "Equinox"?`Soraka
|
||||
What is the name of Swain's raven?`Beatrice
|
||||
Who is the leader of Noxus?`Swain
|
||||
Who is the Noxian Grand General?`Swain
|
||||
Who is the Trifarix Leader of Vision?`Swain
|
||||
Whose personal warship is called the "Leviathan"?`Swain
|
||||
What is Swain's first name?`Jericho
|
||||
Who is also known as the "Master Tactician"?`Swain
|
||||
What is the range of Swain's Vision of Empire?`3500
|
||||
Who says "A whole world to toy with."?`Syndra
|
||||
Who is also known as the "Dark Sovereign"?`Syndra
|
||||
Who has a skill called "Scatter the Weak"?`Syndra
|
||||
@@ -568,7 +588,7 @@ Who is the smallest champion in the game itself?`Teemo
|
||||
Who is rumored to be Teemo's girlfriend?`Tristana
|
||||
Who stopped Veigar during his evil plan in Bandle City?`Teemo
|
||||
What type of poison does Teemo use in his blowgun?`Arjunta
|
||||
Who has a Badger skin?`
|
||||
Who has a Badger skin?`Teemo
|
||||
Who was the original member of the Omega Squad?`Teemo
|
||||
Who has a skill called "The Box"?`Thresh
|
||||
Who has a skill that says "You have opened the box. Your prize: death." in the Death Recap?`Thresh
|
||||
@@ -707,9 +727,10 @@ Who is the only champion who emotes without the player making them (i.e. laughin
|
||||
Who is the Dean of Demolitions at the Yordle Academy in Piltover?`Ziggs
|
||||
Who has a Master Arcanist skin?`Ziggs
|
||||
Who does Zilean have an antagonistic relationship with?`Volibear
|
||||
Who is from the country of Urtistan?`Zilean
|
||||
Name a champion from the Void destroyed city of Icathia?`Jax or Zilean`Jax`Zilean
|
||||
Who joined the league to find a cure for chrono-displasia?`Zilean
|
||||
Name a champion with only one damaging ability?`Tryndamere or Zilean`Tryndamere`Zilean
|
||||
Who has a Groovy skin?`Zilean
|
||||
How long does Zilean's ultimate ability's resurrection stasis last?`3 seconds
|
||||
Name a champion with a non-ultimate ability that cannot be taken at level 1?`Azir or Zilean`Azir`Zilean
|
||||
Who woke up Skarner?`Zilean
|
||||
Which character's walk cycles can be toggled in game?`Zoe
|
||||
@@ -750,5 +771,7 @@ What is Baron Nashor's movement speed?`300`three hundred
|
||||
What is the name of the type minion created by Banner of Command?`Anti-turret Cannon`antiturret cannon
|
||||
What is the name of the continent that League of Legends is located on?`Valoran
|
||||
Which champion is capable of having the most spell vamp?`Akali
|
||||
Which summoner spell has a 240 second cooldown?`Heal
|
||||
What is the name of the spider that lives in the Twisted Treeline?`Vilemaw
|
||||
Which summoner spell has a 240 second cooldown?`Clarity
|
||||
Which summoner spell has a 270 second cooldown?`Heal
|
||||
Who are the masters of the Void?`Watchers
|
||||
@@ -33,11 +33,11 @@ Which champion's ultimate is named: Chain of Corruption?`Varus
|
||||
Which champion's ultimate is named: GNAR!`Gnar
|
||||
Which champion's ultimate is named: Unstoppable Force?`Malphite
|
||||
Which champion's ultimate is named: Frozen Tomb?`Lissandra
|
||||
Which champion's ultimate is named: Ravenous Flock?`Swain
|
||||
Which champion's ultimate is named: Demonic Ascension?`Swain
|
||||
Which champion's ultimate is named: Summon: Tibbers?`Annie
|
||||
Which champion's ultimate is named: Riftwalk?`Kassadin
|
||||
Which champion's ultimate is named: Insanity Potion?`Singed
|
||||
Which champion's ultimate is named: Transcendent Blades?`Irelia
|
||||
Which champion's ultimate is named: Vanguard's Edge?`Irelia
|
||||
Which champion's ultimate is named: Super Mega Death Rocket!`Jinx
|
||||
Which champion's ultimate is named: Intervention?`Kayle
|
||||
Which champion's ultimate is named: Buster Shot?`Tristana
|
||||
@@ -137,3 +137,4 @@ Which champion's ultimate is named: Featherstorm?`Xayah
|
||||
Which champion's ultimate is named: Umbral Trespass?`Kayn
|
||||
Which champion's ultimate is named: Call of the Forge God?`Ornn
|
||||
Which champion's ultimate is named: Portal Jump?`Zoe
|
||||
Which champion's ultimate is named: Killer Instinct?`Kai'sa`kaisa`kai sa
|
||||
@@ -142,7 +142,7 @@ The Special/Physical split happened in what generation?`4`Four
|
||||
Mew, Celebi, Jirachi, Arceus, Keldeo, and Diancie are all examples of what kind of pokémon?`Mythical pokemon`Mythical
|
||||
What is Heracross' Hidden Ability?`Moxie
|
||||
What is Exploud's Hidden Ability?`Scrappy
|
||||
What is the Hidden Ability of Durant?`Traunt
|
||||
What is the Hidden Ability of Durant?`Truant
|
||||
What item increases the amount of HP returned from HP-draining moves?`Big Root
|
||||
Which generation did not introduce any new fossils?`2 or 7`2`Two`7`Seven
|
||||
How many weaknesses does Bug/Steel have?`1`one
|
||||
@@ -347,7 +347,7 @@ In Ruby/Sapphire/Emerald Pokéblock feeders in the Safari Zone attract Pokémon
|
||||
What is the only Baby Pokémon with a branched evolution?`Tyrogue
|
||||
Which one of the following is NOT defined as a baby pokémon: Budew, Riolu, Tyrogue, Chingling, Eevee, Togepi?`Eevee
|
||||
Which Pokémon has the highest base HP of all Fire-type Pokémon?`Entei
|
||||
"It's found crawling on beaches and seafloors. The coral that grows on Corsolas head is as good as a five-star banquet to this Pokémon." What pokémon is this?`Mareanie
|
||||
"It's found crawling on beaches and seafloors. The coral that grows on Corsola's head is as good as a five-star banquet to this Pokémon." What pokémon is this?`Mareanie
|
||||
Roark's father is the Gym leader of what city?`Canalave city`canalave
|
||||
How many Rock-type Gym leaders are there in total (including all generations)?`4`four
|
||||
What is Blaine's strongest Pokémon in Red/Blue/Yellow?`Arcanine
|
||||
|
||||
100
data/trivia/usstateabbreviations.txt
Normal file
100
data/trivia/usstateabbreviations.txt
Normal file
@@ -0,0 +1,100 @@
|
||||
What state is AL?`Alabama
|
||||
What state is AK?`Alaska
|
||||
What state is AZ?`Arizona
|
||||
What state is AR?`Arkansas
|
||||
What state is CA?`California
|
||||
What state is CO?`Colorado
|
||||
What state is CT?`Connecticut
|
||||
What state is DE?`Delaware
|
||||
What state is FL?`Florida
|
||||
What state is GA?`Georgia
|
||||
What state is HI?`Hawaii
|
||||
What state is ID?`Idaho
|
||||
What state is IL?`Illinois
|
||||
What state is IN?`Indiana
|
||||
What state is IA?`Iowa
|
||||
What state is KS?`Kansas
|
||||
What state is KY?`Kentucky
|
||||
What state is LA?`Louisiana
|
||||
What state is ME?`Maine
|
||||
What state is MD?`Maryland
|
||||
What state is MA?`Massachusetts
|
||||
What state is MI?`Michigan
|
||||
What state is MN?`Minnesota
|
||||
What state is MS?`Mississippi
|
||||
What state is MO?`Missouri
|
||||
What state is MT?`Montana
|
||||
What state is NE?`Nebraska
|
||||
What state is NV?`Nevada
|
||||
What state is NH?`New Hampshire
|
||||
What state is NJ?`New Jersey
|
||||
What state is NM?`New Mexico
|
||||
What state is NY?`New York
|
||||
What state is NC?`North Carolina
|
||||
What state is ND?`North Dakota
|
||||
What state is OH?`Ohio
|
||||
What state is OK?`Oklahoma
|
||||
What state is OR?`Oregon
|
||||
What state is PA?`Pennsylvania
|
||||
What state is RI?`Rhode Island
|
||||
What state is SC?`South Carolina
|
||||
What state is SD?`South Dakota
|
||||
What state is TN?`Tennessee
|
||||
What state is TX?`Texas
|
||||
What state is UT?`Utah
|
||||
What state is VT?`Vermont
|
||||
What state is VA?`Virginia
|
||||
What state is WA?`Washington
|
||||
What state is WV?`West Virginia
|
||||
What state is WI?`Wisconsin
|
||||
What state is WY?`Wyoming
|
||||
What is the abbreviation for Alabama?`AL
|
||||
What is the abbreviation for Alaska?`AK
|
||||
What is the abbreviation for Arizona?`AZ
|
||||
What is the abbreviation for Arkansas?`AR
|
||||
What is the abbreviation for California?`CA
|
||||
What is the abbreviation for Colorado?`CO
|
||||
What is the abbreviation for Connecticut?`CT
|
||||
What is the abbreviation for Delaware?`DE
|
||||
What is the abbreviation for Florida?`FL
|
||||
What is the abbreviation for Georgia?`GA
|
||||
What is the abbreviation for Hawaii?`HI
|
||||
What is the abbreviation for Idaho?`ID
|
||||
What is the abbreviation for Illinois?`IL
|
||||
What is the abbreviation for Indiana?`IN
|
||||
What is the abbreviation for Iowa?`IA
|
||||
What is the abbreviation for Kansas?`KS
|
||||
What is the abbreviation for Kentucky?`KY
|
||||
What is the abbreviation for Louisiana?`LA
|
||||
What is the abbreviation for Maine?`ME
|
||||
What is the abbreviation for Maryland?`MD
|
||||
What is the abbreviation for Massachusetts?`MA
|
||||
What is the abbreviation for Michigan?`MI
|
||||
What is the abbreviation for Minnesota?`MN
|
||||
What is the abbreviation for Mississippi?`MS
|
||||
What is the abbreviation for Missouri?`MO
|
||||
What is the abbreviation for Montana?`MT
|
||||
What is the abbreviation for Nebraska?`NE
|
||||
What is the abbreviation for Nevada?`NV
|
||||
What is the abbreviation for New Hampshire?`NH
|
||||
What is the abbreviation for New Jersey?`NJ
|
||||
What is the abbreviation for New Mexico?`NM
|
||||
What is the abbreviation for New York?`NY
|
||||
What is the abbreviation for North Carolina?`NC
|
||||
What is the abbreviation for North Dakota?`ND
|
||||
What is the abbreviation for Ohio?`OH
|
||||
What is the abbreviation for Oklahoma?`OK
|
||||
What is the abbreviation for Oregon?`OR
|
||||
What is the abbreviation for Pennsylvania?`PA
|
||||
What is the abbreviation for Rhode Island?`RI
|
||||
What is the abbreviation for South Carolina?`SC
|
||||
What is the abbreviation for South Dakota?`SD
|
||||
What is the abbreviation for Tennessee?`TN
|
||||
What is the abbreviation for Texas?`TX
|
||||
What is the abbreviation for Utah?`UT
|
||||
What is the abbreviation for Vermont?`VT
|
||||
What is the abbreviation for Virginia?`VA
|
||||
What is the abbreviation for Washington?`WA
|
||||
What is the abbreviation for West Virginia?`WV
|
||||
What is the abbreviation for Wisconsin?`WI
|
||||
What is the abbreviation for Wyoming?`WY
|
||||
44
red.py
44
red.py
@@ -63,6 +63,12 @@ class Bot(commands.Bot):
|
||||
self.logger = set_logger(self)
|
||||
self._last_exception = None
|
||||
self.oauth_url = ""
|
||||
|
||||
try:
|
||||
self._cog_registry = dataIO.load_json("data/red/cogs.json")
|
||||
except Exception:
|
||||
self._cog_registry = {}
|
||||
|
||||
if 'self_bot' in kwargs:
|
||||
self.settings.self_bot = kwargs['self_bot']
|
||||
else:
|
||||
@@ -218,6 +224,18 @@ class Bot(commands.Bot):
|
||||
response = self.loop.run_in_executor(None, install)
|
||||
return await asyncio.wait_for(response, timeout=timeout)
|
||||
|
||||
def set_cog(self, cog, value, save=True):
|
||||
self._cog_registry[cog] = value
|
||||
|
||||
if save:
|
||||
self.save_cogs()
|
||||
|
||||
def save_cogs(self):
|
||||
dataIO.save_json("data/red/cogs.json", self._cog_registry)
|
||||
|
||||
@property
|
||||
def first_run(self):
|
||||
return self.settings.bot_settings == self.settings.default_settings
|
||||
|
||||
class Formatter(commands.HelpFormatter):
|
||||
def __init__(self, *args, **kwargs):
|
||||
@@ -244,6 +262,7 @@ def initialize(bot_class=Bot, formatter_class=Formatter):
|
||||
__main__.send_cmd_help = bot.send_cmd_help # Backwards
|
||||
__main__.user_allowed = bot.user_allowed # compatibility
|
||||
__main__.settings = bot.settings # sucks
|
||||
__main__.set_cog = bot.set_cog # greatly
|
||||
|
||||
async def get_oauth_url():
|
||||
try:
|
||||
@@ -526,21 +545,10 @@ def get_answer():
|
||||
return False
|
||||
|
||||
|
||||
def set_cog(cog, value): # TODO: move this out of red.py
|
||||
data = dataIO.load_json("data/red/cogs.json")
|
||||
data[cog] = value
|
||||
dataIO.save_json("data/red/cogs.json", data)
|
||||
|
||||
|
||||
def load_cogs(bot):
|
||||
defaults = ("alias", "audio", "customcom", "downloader", "economy",
|
||||
"general", "image", "mod", "streams", "trivia")
|
||||
|
||||
try:
|
||||
registry = dataIO.load_json("data/red/cogs.json")
|
||||
except:
|
||||
registry = {}
|
||||
|
||||
bot.load_extension('cogs.owner')
|
||||
owner_cog = bot.get_cog('Owner')
|
||||
if owner_cog is None:
|
||||
@@ -550,21 +558,21 @@ def load_cogs(bot):
|
||||
|
||||
if bot.settings._no_cogs:
|
||||
bot.logger.debug("Skipping initial cogs loading (--no-cogs)")
|
||||
if not os.path.isfile("data/red/cogs.json"):
|
||||
dataIO.save_json("data/red/cogs.json", {})
|
||||
bot._cog_registry.clear()
|
||||
bot.save_cogs()
|
||||
return
|
||||
|
||||
failed = []
|
||||
extensions = owner_cog._list_cogs()
|
||||
|
||||
if not registry: # All default cogs enabled by default
|
||||
if not bot._cog_registry: # All default cogs enabled by default
|
||||
for ext in defaults:
|
||||
registry["cogs." + ext] = True
|
||||
bot._cog_registry["cogs." + ext] = True
|
||||
|
||||
for extension in extensions:
|
||||
if extension.lower() == "cogs.owner":
|
||||
continue
|
||||
to_load = registry.get(extension, False)
|
||||
to_load = bot._cog_registry.get(extension, False)
|
||||
if to_load:
|
||||
try:
|
||||
owner_cog._load_cog(extension)
|
||||
@@ -572,9 +580,9 @@ def load_cogs(bot):
|
||||
print("{}: {}".format(e.__class__.__name__, str(e)))
|
||||
bot.logger.exception(e)
|
||||
failed.append(extension)
|
||||
registry[extension] = False
|
||||
bot._cog_registry[extension] = False
|
||||
|
||||
dataIO.save_json("data/red/cogs.json", registry)
|
||||
bot.save_cogs()
|
||||
|
||||
if failed:
|
||||
print("\nFailed to load: {}\n".format(" ".join(failed)))
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
pip
|
||||
git+git://github.com/Rapptz/discord.py.git#egg=discord.py[voice]
|
||||
git+git://github.com/Rapptz/discord.py.git@async#egg=discord.py[voice]
|
||||
youtube_dl
|
||||
imgurpython
|
||||
@@ -1,4 +1,4 @@
|
||||
pip
|
||||
git+git://github.com/Rapptz/discord.py.git
|
||||
git+git://github.com/Rapptz/discord.py.git@async
|
||||
youtube_dl
|
||||
imgurpython
|
||||
@@ -29,7 +29,7 @@ GOTO end
|
||||
:message
|
||||
echo Couldn't find a valid Python ^>3.5 installation. Python needs to be installed and available in the PATH environment
|
||||
echo variable.
|
||||
echo https://twentysix26.github.io/Red-Docs/red_win_requirements/#software
|
||||
echo https://twentysix26.github.io/Red-Docs/red_install_windows/#software
|
||||
PAUSE
|
||||
|
||||
:end
|
||||
|
||||
Reference in New Issue
Block a user