First commit

This commit is contained in:
Twentysix 2016-02-07 18:47:24 +01:00
commit a3fcbe944d
24 changed files with 3846 additions and 0 deletions

6
.gitignore vendored Normal file
View File

@ -0,0 +1,6 @@
*.json
*.pyc
__pycache__
data
!data/trivia/*
!data/audio/playlists/*

674
LICENSE Normal file
View File

@ -0,0 +1,674 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
{one line to give the program's name and a brief idea of what it does.}
Copyright (C) {year} {name of author}
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
{project} Copyright (C) {year} {fullname}
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.

614
cogs/audio.py Normal file
View File

@ -0,0 +1,614 @@
import discord
from discord.ext import commands
import asyncio
import threading
import youtube_dl
import os
from random import choice as rndchoice
from random import shuffle
from .utils.dataIO import fileIO
from .utils import checks
import glob
import re
import aiohttp
from bs4 import BeautifulSoup
import __main__
import json
if not discord.opus.is_loaded():
discord.opus.load_opus('libopus-0.dll')
main_path = os.path.dirname(os.path.realpath(__main__.__file__))
settings = {"VOLUME" : 0.5, "MAX_LENGTH" : 3700, "QUEUE_MODE" : True}
youtube_dl_options = {
'format': 'bestaudio/best',
'extractaudio': True,
'audioformat': "mp3",
'outtmpl': '%(id)s',
'noplaylist': True,
'nocheckcertificate': True,
'ignoreerrors': True,
'quiet': True,
'no_warnings': True,
'outtmpl': "data/audio/cache/%(id)s"}
class Audio:
"""Music streaming."""
def __init__(self, bot):
self.bot = bot
self.music_player = EmptyPlayer()
self.queue_mode = False
self.queue = []
self.playlist = []
self.current = -1 #current track index in self.playlist
self.downloader = {"DONE" : False, "TITLE" : False, "ID" : False, "URL" : False, "DURATION" : False, "DOWNLOADING" : False}
self.quit_manager = False
self.skip_votes = []
self.sing = ["https://www.youtube.com/watch?v=zGTkAVsrfg8", "https://www.youtube.com/watch?v=cGMWL8cOeAU",
"https://www.youtube.com/watch?v=vFrjMq4aL-g", "https://www.youtube.com/watch?v=WROI5WYBU_A",
"https://www.youtube.com/watch?v=41tIUr_ex3g", "https://www.youtube.com/watch?v=f9O2Rjn1azc"]
@commands.command(pass_context=True, no_pm=True)
async def play(self, ctx, link : str):
"""Plays link
"""
if self.downloader["DOWNLOADING"]:
await self.bot.say("I'm already downloading a track.")
return
msg = ctx.message
if await self.check_voice(msg.author, msg):
if self.is_playlist_valid([link]): # reusing a function
if await self.is_alone_or_admin(msg.author):
self.queue = []
self.playlist = []
self.current = -1
await self.play_video(link)
else:
self.playlist = []
self.current = -1
if not queue: await self.bot.say("The link has been put into queue.")
self.queue.append(link)
else:
await self.bot.say("That link is not allowed.")
@commands.command(aliases=["title"])
async def song(self):
"""Shows song title
"""
if self.downloader["TITLE"]:
await self.bot.say(self.downloader["TITLE"])
else:
await self.bot.say("No title available.")
@commands.command(name="playlist", pass_context=True, no_pm=True)
async def _playlist(self, ctx, name : str): #some checks here
"""Plays saved playlist
"""
await self.start_playlist(ctx, name, random=False)
@commands.command(pass_context=True, no_pm=True)
async def mix(self, ctx, name : str): #some checks here
"""Plays saved playlist (shuffled)
"""
await self.start_playlist(ctx, name, random=True)
async def start_playlist(self, ctx, name, random=None):
if self.downloader["DOWNLOADING"]:
await self.bot.say("I'm already downloading a track.")
return
msg = ctx.message
name += ".txt"
if await self.check_voice(msg.author, msg):
if os.path.isfile("data/audio/playlists/" + name):
self.queue = []
self.current = -1
self.playlist = fileIO("data/audio/playlists/" + name, "load")["playlist"]
if random: shuffle(self.playlist)
self.music_player.stop()
@commands.command(pass_context=True, aliases=["next"], no_pm=True)
async def skip(self, ctx):
"""Skips song
"""
msg = ctx.message
if self.music_player.is_playing():
if await self.is_alone_or_admin(msg.author):
self.music_player.stop()
else:
await self.vote_skip(msg)
async def vote_skip(self, msg):
v_channel = msg.server.me.voice_channel
if msg.author.voice_channel.id == v_channel.id:
if msg.author.id in self.skip_votes:
await self.bot.say("You already voted.")
return
self.skip_votes.append(msg.author.id)
if msg.server.me.id not in self.skip_votes: self.skip_votes.append(msg.server.me.id)
current_users = []
for m in v_channel.voice_members:
current_users.append(m.id)
clean_skip_votes = [] #Removes votes of people no longer in the channel
for m_id in self.skip_votes:
if m_id in current_users:
clean_skip_votes.append(m_id)
self.skip_votes = clean_skip_votes
votes_needed = int((len(current_users)-1) / 2)
if len(self.skip_votes)-1 >= votes_needed:
self.music_player.stop()
self.skip_votes = []
return
await self.bot.say("You voted to skip. Votes: [{0}/{1}]".format(str(len(self.skip_votes)-1), str(votes_needed)))
@commands.command(pass_context=True, no_pm=True)
async def local(self, ctx, name : str):
"""Plays a local playlist"""
if self.downloader["DOWNLOADING"]:
await self.bot.say("I'm already downloading a track.")
return
msg = ctx.message
localplaylists = self.get_local_playlists()
if localplaylists and ("data/audio/localtracks/" not in name and "\\" not in name):
if name in localplaylists:
files = []
if glob.glob("data/audio/localtracks/" + name + "/*.mp3"):
files.extend(glob.glob("data/audio/localtracks/" + name + "/*.mp3"))
if glob.glob("data/audio/localtracks/" + name + "/*.flac"):
files.extend(glob.glob("data/audio/localtracks/" + name + "/*.flac"))
if await self.is_alone_or_admin(msg.author):
if await self.check_voice(msg.author, ctx.message):
self.queue = []
self.current = -1
self.playlist = files
self.music_player.stop()
else:
await self.bot.say("I'm in queue mode. Controls are disabled if you're in a room with multiple people.")
else:
await self.bot.say("There is no local playlist with that name.")
else:
await self.bot.say(message.channel, "There are no valid playlists in the localtracks folder.")
@commands.command(pass_context=True, no_pm=True)
async def loop(self, ctx):
"""Loops single song
"""
msg = ctx.message
if self.music_player.is_playing():
if await self.is_alone_or_admin(msg.author):
if self.playlist:
self.playlist = self.playlist[[self.current]]
elif self.queue:
self.playlist = self.playlist[[self.queue[0]]]
await self.bot.say("I will play this song on repeat.")
else:
await self.bot.say("I'm in queue mode. Controls are disabled if you're in a room with multiple people.")
@commands.command(pass_context=True, no_pm=True)
async def shuffle(self, ctx):
"""Shuffle playlist
"""
msg = ctx.message
if self.music_player.is_playing():
if await self.is_alone_or_admin(msg.author):
if self.playlist:
shuffle(self.playlist)
await self.bot.say("The order of this playlist has been mixed")
else:
await self.bot.say("I'm in queue mode. Controls are disabled if you're in a room with multiple people.")
@commands.command(pass_context=True, aliases=["previous"], no_pm=True) #TODO, PLAYLISTS
async def prev(self, ctx):
"""Previous song
"""
msg = ctx.message
if self.music_player.is_playing() and self.playlist:
if await self.is_alone_or_admin(msg.author):
self.current -= 2
if self.current == -1:
self.current = len(self.playlist) -3
elif self.current == -2:
self.current = len(self.playlist) -2
self.music_player.stop()
@commands.command(pass_context=True, no_pm=True)
async def stop(self, ctx):
"""Stops audio activity
"""
msg = ctx.message
if self.music_player.is_playing():
if await self.is_alone_or_admin(msg.author):
await self.close_audio()
else:
await self.bot.say("You can't stop music when there are other people in the channel! Vote to skip instead.")
else:
await self.close_audio()
async def close_audio(self):
self.queue = []
self.playlist = []
self.current = -1
self.music_player.stop()
await asyncio.sleep(1)
await self.bot.voice.disconnect()
@commands.command(name="queue", pass_context=True, no_pm=True) #check that author is in the same channel as the bot
async def _queue(self, ctx, link : str):
"""Add link to queue
"""
if await self.check_voice(ctx.message.author, ctx.message):
if not self.playlist:
self.queue.append(link)
await self.bot.say(self.queue)
else:
await self.bot.say("I'm already playing a playlist.")
async def is_alone_or_admin(self, author): #Direct control. fix everything
if not settings["QUEUE_MODE"]:
return True
elif discord.utils.get(author.roles, name=checks.settings["ADMIN_ROLE"]) is not None:
return True
elif discord.utils.get(author.roles, name=checks.settings["MOD_ROLE"]) is not None:
return True
elif len(author.voice_channel.voice_members) == 2:
return True
else:
return False
@commands.command(name="sing", pass_context=True, no_pm=True)
async def _sing(self, ctx):
"""Makes Red sing"""
if self.downloader["DOWNLOADING"]:
await self.bot.say("I'm already downloading a track.")
return
msg = ctx.message
if await self.check_voice(msg.author, msg):
if not self.music_player.is_playing():
self.queue = []
await self.play_video(rndchoice(self.sing))
else:
if await self.is_alone_or_admin(msg.author):
self.queue = []
await self.play_video(rndchoice(self.sing))
else:
await self.bot.say("I'm already playing music for someone else at the moment.")
@commands.group(name="list", pass_context=True)
async def _list(self, ctx):
"""Lists playlists"""
if ctx.invoked_subcommand is None:
await self.bot.say("Type help list for info.")
@_list.command(name="playlist", pass_context=True)
async def list_playlist(self, ctx):
msg = "Available playlists: \n\n```"
files = os.listdir("data/audio/playlists/")
if files:
for i, f in enumerate(files):
if f.endswith(".txt"):
if i % 4 == 0 and i != 0:
msg = msg + f.replace(".txt", "") + "\n"
else:
msg = msg + f.replace(".txt", "") + "\t"
msg += "```"
await self.bot.send_message(ctx.message.author, msg)
else:
await self.bot.say("There are no playlists.")
@_list.command(name="local", pass_context=True)
async def list_local(self, ctx):
msg = "Available local playlists: \n\n```"
dirs = self.get_local_playlists()
if dirs:
for i, d in enumerate(dirs):
if i % 4 == 0 and i != 0:
msg = msg + d + "\n"
else:
msg = msg + d + "\t"
msg += "```"
await self.bot.send_message(ctx.message.author, msg)
else:
await self.bot.say("There are no local playlists.")
@commands.group(pass_context=True)
@checks.mod_or_permissions()
async def audioset(self, ctx):
"""Changes audio module settings"""
if ctx.invoked_subcommand is None:
msg = "```"
for k, v in settings.items():
msg += str(k) + ": " + str(v) + "\n"
msg += "\nType help audioset to see the list of commands.```"
await self.bot.say(msg)
@audioset.command(name="queue")
async def queueset(self, status : str):
"""Enables/disables queue"""
global settings
status = status.lower()
if status == "on" or status == "true":
settings["QUEUE_MODE"] = True
await self.bot.say("Queue mode is now on.")
elif status == "off" or status == "false":
settings["QUEUE_MODE"] = False
await self.bot.say("Queue mode is now off.")
else:
await self.bot.say("Queue status can be either on or off.")
return
self.save_settings()
@audioset.command()
async def maxlength(self, length : int):
"""Maximum track length for requested links"""
global settings
settings["MAX_LENGTH"] = length
await self.bot.say("Maximum length is now " + str(length) + " seconds.")
self.save_settings()
@audioset.command()
async def volume(self, level : float):
"""Sets the volume (0-1)"""
global settings
if level >= 0 and level <= 1:
settings["VOLUME"] = level
await self.bot.say("Volume is now set at " + str(level) + ". It will take effect after the current track.")
self.save_settings()
else:
await self.bot.say("Volume must be between 0 and 1. Example: 0.40")
async def play_video(self, link):
self.downloader = {"DONE" : False, "TITLE" : False, "ID" : False, "URL": False, "DURATION" : False, "DOWNLOADING" : False}
if "https://" in link or "http://" in link:
path = "data/audio/cache/"
t = threading.Thread(target=self.get_video, args=(link,self,))
t.start()
else: #local
path = ""
self.downloader = {"DONE" : True, "TITLE" : link, "ID" : link, "URL": False, "DURATION" : False, "DOWNLOADING" : False}
while not self.downloader["DONE"]:
await asyncio.sleep(1)
if self.downloader["ID"]:
try:
self.music_player.stop()
self.music_player = self.bot.voice.create_ffmpeg_player(path + self.downloader["ID"], options='''-filter:a "volume={}"'''.format(settings["VOLUME"]))
self.music_player.start()
if path != "": await self.bot.change_status(discord.Game(name=self.downloader["TITLE"]))
except discord.errors.ClientException:
print("Error: I can't play music without ffmpeg. Install it.")
self.downloader = {"DONE" : False, "TITLE" : False, "ID" : False, "URL": False, "DURATION" : False, "DOWNLOADING" : False}
self.queue = []
self.playlist = []
except Exception as e:
print(e)
else:
pass
async def check_voice(self, author, message):
if self.bot.is_voice_connected():
v_channel = message.server.me.voice_channel
if author.voice_channel == v_channel:
return True
elif len(v_channel.voice_members) == 1:
if author.is_voice_connected():
if author.voice_channel.permissions_for(message.server.me).connect:
await self.bot.join_voice_channel(author.voice_channel)
return True
else:
await self.bot.say("I need permissions to join that voice channel.")
return False
else:
await self.bot.say("You need to be in a voice channel.")
return False
else:
if not self.playlist and not self.queue:
return True
else:
await self.bot.say("I'm already playing music for other people.")
return False
elif author.voice_channel:
if author.voice_channel.permissions_for(message.server.me).connect:
await self.bot.join_voice_channel(author.voice_channel)
return True
else:
await self.bot.say("I need permissions to join that voice channel.")
return False
else:
await self.bot.say("You need to be in a voice channel.")
return False
async def queue_manager(self):
while not self.quit_manager:
if self.queue and not self.music_player.is_playing():
new_link = self.queue[0]
self.queue.pop(0)
self.skip_votes = []
await self.play_video(new_link)
elif self.playlist and not self.music_player.is_playing():
if not self.current == len(self.playlist)-1:
self.current += 1
else:
self.current = 0
new_link = self.playlist[self.current]
self.skip_votes = []
await self.play_video(new_link)
await asyncio.sleep(1)
def get_video(self, url, audio):
try:
self.downloader["DOWNLOADING"] = True
yt = youtube_dl.YoutubeDL(youtube_dl_options)
v = yt.extract_info(url, download=False)
if v["duration"] > settings["MAX_LENGTH"]: raise MaximumLength("Track exceeded maximum length. See help audioset maxlength")
if not os.path.isfile("data/audio/cache/" + v["id"]):
v = yt.extract_info(url, download=True)
audio.downloader = {"DONE" : True, "TITLE" : v["title"], "ID" : v["id"], "URL" : url, "DURATION" : v["duration"], "DOWNLOADING" : False} #Errors out here if invalid link
except Exception as e:
print(e) # TODO
audio.downloader = {"DONE" : True, "TITLE" : False, "ID" : False, "URL" : False, "DOWNLOADING" : False}
async def incoming_messages(self, msg): # Workaround, need to fix
if msg.author.id != self.bot.user.id:
cmds = ("unload cogs.audio", "reload cogs.audio")
if msg.content in cmds:
self.quit_manager = True
if msg.channel.is_private and msg.attachments != []:
await self.transfer_playlist(msg)
if not msg.channel.is_private:
if not self.playlist and not self.queue and not self.music_player.is_playing() and msg.server.me.game != None:
await self.bot.change_status(None)
def get_local_playlists(self):
dirs = []
files = os.listdir("data/audio/localtracks/")
for f in files:
if os.path.isdir("data/audio/localtracks/" + f) and " " not in f:
if glob.glob("data/audio/localtracks/" + f + "/*.mp3") != []:
dirs.append(f)
elif glob.glob("data/audio/localtracks/" + f + "/*.flac") != []:
dirs.append(f)
if dirs != []:
return dirs
else:
return False
@commands.command(pass_context=True, no_pm=True)
async def addplaylist(self, ctx, name : str, link : str): #CHANGE COMMAND NAME
"""Adds tracks from youtube playlist link"""
if self.is_playlist_name_valid(name) and len(name) < 25 and self.is_playlist_link_valid(link):
if fileIO("playlists/" + name + ".txt", "check"):
await self.bot.say("`A playlist with that name already exists.`")
return False
links = await self.parse_yt_playlist(link)
if links:
data = { "author" : ctx.message.author.id,
"playlist": links,
"link" : link}
fileIO("data/audio/playlists/" + name + ".txt", "save", data)
await self.bot.say("Playlist added. Name: {}".format(name))
else:
await self.bot.say("Something went wrong. Either the link was incorrect or I was unable to retrieve the page.")
else:
await self.bot.say("Something is wrong with the playlist's link or its filename. Remember, the name must be with only numbers, letters and underscores. Link must be this format: https://www.youtube.com/playlist?list=PLe8jmEHFkvsaDOOWcREvkgFoj6MD0pXXX")
async def transfer_playlist(self, message):
msg = message.attachments[0]
if msg["filename"].endswith(".txt"):
if not fileIO("data/audio/playlists/" + msg["filename"], "check"): #returns false if file already exists
r = await aiohttp.get(msg["url"])
r = await r.text()
data = r.replace("\r", "")
data = data.split()
if self.is_playlist_valid(data) and self.is_playlist_name_valid(msg["filename"].replace(".txt", "")):
data = { "author" : message.author.id,
"playlist": data,
"link" : False}
fileIO("data/audio/playlists/" + msg["filename"], "save", data)
await self.bot.send_message(message.channel, "Playlist added. Name: {}".format(msg["filename"].replace(".txt", "")))
else:
await self.bot.send_message(message.channel, "Something is wrong with the playlist or its filename.") # Add formatting info
else:
await self.bot.send_message(message.channel, "A playlist with that name already exists. Change the filename and resubmit it.")
def is_playlist_valid(self, data):
data = [y for y in data if y != ""] # removes all empty elements
data = [y for y in data if y != "\n"]
pattern = "|".join(fileIO("data/audio/accepted_links.json", "load"))
for link in data:
rr = re.search(pattern, link, re.I | re.U)
if rr == None:
return False
return True
def is_playlist_link_valid(self, link):
pattern = "^https:\/\/www.youtube.com\/playlist\?list=(.[^:/]*)"
rr = re.search(pattern, link, re.I | re.U)
if not rr == None:
return rr.group(1)
else:
return False
def is_playlist_name_valid(self, name):
for l in name:
if l.isdigit() or l.isalpha() or l == "_":
pass
else:
return False
return True
async def parse_yt_playlist(self, url):
headers = {'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36'}
try:
page = await aiohttp.post(url, headers=headers)
page = await page.text()
soup = BeautifulSoup(page, 'html.parser')
tags = soup.find_all("tr", class_="pl-video yt-uix-tile ")
links = []
for tag in tags:
links.append("https://www.youtube.com/watch?v=" + tag['data-video-id'])
if links != []:
return links
else:
return False
except:
return False
def save_settings(self):
with open(main_path + "/data/audio/settings.json", "w") as f:
f.write(json.dumps(settings))
class EmptyPlayer(): #dummy player
def __init__(self):
pass
def stop(self):
pass
def is_playing(self):
return False
class MaximumLength(Exception):
def __init__(self, m):
self.message = m
def __str__(self):
return self.message
def check_folders():
folders = ("data/audio", "data/audio/cache", "data/audio/playlists")
for folder in folders:
if not os.path.exists(folder):
print("Creating " + folder + " folder...")
os.makedirs(folder)
def check_files(n):
if not os.path.isfile(main_path + "/data/audio/settings.json"):
print("Creating default audio settings.json...")
n.save_settings()
allowed = ["^(https:\/\/www\\.youtube\\.com\/watch\\?v=...........*)", "^(https:\/\/youtu.be\/...........*)",
"^(https:\/\/youtube\\.com\/watch\\?v=...........*)", "^(https:\/\/soundcloud\\.com\/.*)"]
if not os.path.isfile(main_path + "/data/audio/accepted_links.json"):
print("Creating accepted_links.json...")
with open(main_path + "/data/audio/accepted_links.json", "w") as f:
f.write(json.dumps(allowed))
def setup(bot):
loop = asyncio.get_event_loop()
n = Audio(bot)
check_folders()
check_files(n)
loop.create_task(n.queue_manager())
bot.add_listener(n.incoming_messages, "on_message")
bot.add_cog(n)

112
cogs/customcom.py Normal file
View File

@ -0,0 +1,112 @@
import discord
from discord.ext import commands
from .utils.dataIO import fileIO
from .utils import checks
import os
class CustomCommands:
"""Custom commands."""
def __init__(self, bot):
self.bot = bot
self.c_commands = fileIO("data/customcom/commands.json", "load")
@checks.mod_or_permissions()
@commands.command(pass_context=True, no_pm=True)
async def addcom(self, ctx, command : str, *text):
"""Adds a custom command
Example:
!addcom yourcommand Text you want
"""
if text == ():
await self.bot.say("addcom [command] [text/url]")
return
server = ctx.message.server
channel = ctx.message.channel
text = " ".join(text)
if not server.id in self.c_commands:
self.c_commands[server.id] = {}
cmdlist = self.c_commands[server.id]
if command not in cmdlist:
cmdlist[command] = text
self.c_commands[server.id] = cmdlist
fileIO("data/customcom/commands.json", "save", self.c_commands)
await self.bot.say("`Custom command successfully added.`")
else:
await self.bot.say("`This command already exists. Use editcom to edit it.`")
@checks.mod_or_permissions()
@commands.command(pass_context=True, no_pm=True)
async def editcom(self, ctx, command : str, *text):
"""Edits a custom command
Example:
!editcom yourcommand Text you want
"""
if text == ():
await self.bot.say("editcom [command] [text/url]")
return
server = ctx.message.server
channel = ctx.message.channel
text = " ".join(text)
if server.id in self.c_commands:
cmdlist = self.c_commands[server.id]
if command in cmdlist:
cmdlist[command] = text
self.c_commands[server.id] = cmdlist
fileIO("data/customcom/commands.json", "save", self.c_commands)
await self.bot.say("`Custom command successfully edited.`")
else:
await self.bot.say("`That command doesn't exist. Use addcom [command] [text]`")
else:
await self.bot.say("`There are no custom commands in this server. Use addcom [command] [text]`")
@checks.mod_or_permissions()
@commands.command(pass_context=True, no_pm=True)
async def delcom(self, ctx, command : str):
"""Deletes a custom command
Example:
!delcom yourcommand"""
server = ctx.message.server
channel = ctx.message.channel
if server.id in self.c_commands:
cmdlist = self.c_commands[server.id]
if command in cmdlist:
cmdlist.pop(command, None)
self.c_commands[server.id] = cmdlist
fileIO("data/customcom/commands.json", "save", self.c_commands)
await self.bot.send_message(channel, "`Custom command successfully deleted.`")
else:
await self.bot.say("`That command doesn't exist.`")
else:
await self.bot.send_message(channel, "`There are no custom commands in this server. Use addcom [command] [text]`")
async def checkCC(self, message):
if message.author.id == self.bot.user.id or len(message.content) < 2 or message.channel.is_private:
return
msg = message.content
server = message.server
if msg[0] in self.bot.command_prefix and server.id in self.c_commands.keys():
cmdlist = self.c_commands[server.id]
if msg[1:] in cmdlist:
await self.bot.send_message(message.channel, cmdlist[msg[1:]])
def check_folders():
if not os.path.exists("data/customcom"):
print("Creating data/customcom folder...")
os.makedirs("data/customcom")
def check_files():
f = "data/customcom/commands.json"
if not fileIO(f, "check"):
print("Creating empty commands.json...")
fileIO(f, "save", {})
def setup(bot):
check_folders()
check_files()
n = CustomCommands(bot)
bot.add_listener(n.checkCC, "on_message")
bot.add_cog(n)

277
cogs/general.py Normal file
View File

@ -0,0 +1,277 @@
import discord
from discord.ext import commands
from random import randint
from random import choice as randchoice
import datetime
import time
import aiohttp
import asyncio
settings = {"POLL_DURATION" : 60}
class General:
"""General commands."""
def __init__(self, bot):
self.bot = bot
self.stopwatches = {}
self.ball = ["As I see it, yes", "It is certain", "It is decidedly so", "Most likely", "Outlook good",
"Signs point to yes", "Without a doubt", "Yes", "Yes definitely", "You may rely on it", "Reply hazy, try again",
"Ask again later", "Better not tell you now", "Cannot predict now", "Concentrate and ask again",
"Don't count on it", "My reply is no", "My sources say no", "Outlook not so good", "Very doubtful"]
self.poll_sessions = []
@commands.command()
async def choose(self, *choices):
"""Chooses between multiple choices.
To denote multiple choices, you should use double quotes.
"""
if len(choices) < 2:
await self.bot.say('Not enough choices to pick from.')
else:
await self.bot.say(choice(choices))
@commands.command()
async def roll(self, number : int = 100):
"""Rolls random number (between 1 and user choice)
Defaults to 100.
"""
if number > 1:
return await self.bot.say(":game_die: " + str(randint(1, number)) + " :game_die:")
else:
return await self.bot.say("Maybe higher than 1? ;P")
@commands.command(pass_context=True)
async def flip(self, ctx, user : discord.Member=None):
"""Flips a coin... or a user.
Defaults to coin.
"""
if user != None:
msg = ""
if user.id == self.bot.user.id:
user = ctx.message.author
msg = "Nice try. You think this is funny? How about *this* instead:\n\n"
char = "abcdefghijklmnopqrstuvwxyz"
tran = "ɐqɔpǝɟƃɥᴉɾʞlɯuodbɹsʇnʌʍxʎz"
table = str.maketrans(char, tran)
name = user.name.translate(table)
char = char.upper()
tran = "∀qƆpƎℲפHIſʞ˥WNOԀQᴚS┴∩ΛMX⅄Z"
table = str.maketrans(char, tran)
name = name.translate(table)
return await self.bot.say(msg + "(╯°□°)╯︵ " + name[::-1])
else:
return await self.bot.say("*flips a coin and... " + randchoice(["HEADS!*", "TAILS!*"]))
@commands.command(pass_context=True)
async def rps(self, ctx, choice : str):
"""Play rock paper scissors"""
author = ctx.message.author
rpsbot = {"rock" : ":moyai:",
"paper": ":page_facing_up:",
"scissors":":scissors:"}
choice = choice.lower()
if choice in rpsbot.keys():
botchoice = randchoice(list(rpsbot.keys()))
msgs = {
"win": " You win {}!".format(author.mention),
"square": " We're square {}!".format(author.mention),
"lose": " You lose {}!".format(author.mention)
}
if choice == botchoice:
await self.bot.say(rpsbot[botchoice] + msgs["square"])
elif choice == "rock" and botchoice == "paper":
await self.bot.say(rpsbot[botchoice] + msgs["lose"])
elif choice == "rock" and botchoice == "scissors":
await self.bot.say(rpsbot[botchoice] + msgs["win"])
elif choice == "paper" and botchoice == "rock":
await self.bot.say(rpsbot[botchoice] + msgs["win"])
elif choice == "paper" and botchoice == "scissors":
await self.bot.say(rpsbot[botchoice] + msgs["lose"])
elif choice == "scissors" and botchoice == "rock":
await self.bot.say(rpsbot[botchoice] + msgs["lose"])
elif choice == "scissors" and botchoice == "paper":
await self.bot.say(rpsbot[botchoice] + msgs["win"])
else:
await self.bot.say("Choose rock, paper or scissors.")
@commands.command(name="8", aliases=["8ball"])
async def _8ball(self, question : str):
"""Ask 8 ball a question
Question must end with a question mark.
"""
if question.endswith("?") and question != "?":
return await self.bot.say("```" + randchoice(self.ball) + "```")
else:
return await self.bot.say("That doesn't look like a question.")
@commands.command(aliases=["sw"], pass_context=True)
async def stopwatch(self, ctx):
"""Starts/stops stopwatch"""
author = ctx.message.author
if not author.id in self.stopwatches:
self.stopwatches[author.id] = int(time.perf_counter())
await self.bot.say(author.mention + " Stopwatch started!")
else:
tmp = abs(self.stopwatches[author.id] - int(time.perf_counter()))
tmp = str(datetime.timedelta(seconds=tmp))
await self.bot.say(author.mention + " Stopwatch stopped! Time: **" + str(tmp) + "**")
self.stopwatches.pop(author.id, None)
@commands.command()
async def lmgtfy(self, *text):
"""Creates a lmgtfy link"""
if text == ():
await self.bot.say("lmgtfy [search terms]")
return
text = "+".join(text)
await self.bot.say("http://lmgtfy.com/?q=" + text)
@commands.command(no_pm=True, hidden=True)
async def hug(self, member : discord.Member = None):
"""Because everyone likes hugs"""
await self.bot.say("(っ´▽`)っ" + " *" + member.name + "*")
@commands.command(pass_context=True, no_pm=True)
async def info(self, ctx, member : discord.Member = None):
"""Shows member's information"""
author = ctx.message.author
if not member:
member = author
roles = []
for m in member.roles:
if m.name != "@everyone":
roles.append('"' + m.name + '"') #.replace("@", "@\u200b")
if not roles: roles = ["None"]
data = "```\n"
data += "Name: " + member.name + "\n"
data += "ID: " + member.id + "\n"
data += "Joined: " + str(member.joined_at) + "\n"
data += "Roles: " + " ".join(roles) + "\n"
data += "Avatar: " + member.avatar_url + "\n"
data += "```"
await self.bot.say(data)
@commands.command()
async def urban(self, *, search_terms : str):
"""Urban Dictionary search"""
search_terms = search_terms.split(" ")
search_terms = "+".join(search_terms)
search = "http://api.urbandictionary.com/v0/define?term=" + search_terms
try:
async with aiohttp.get(search) as r:
result = await r.json()
if result["list"] != []:
definition = result['list'][0]['definition']
example = result['list'][0]['example']
await self.bot.say("**Definition:** " + definition + "\n\n" + "**Example:** " + example )
else:
await self.bot.say("Your search terms gave no results.")
except:
await self.bot.say("Error.")
@commands.command(pass_context=True, no_pm=True)
async def poll(self, ctx, *text):
"""Starts/stops a poll
Usage example:
poll Is this a poll?;Yes;No;Maybe"""
message = ctx.message
print(text)
if len(text) == 1:
if text[0].lower() == "stop":
await self.endpoll(message)
return
if not self.getPollByChannel(message):
p = NewPoll(message, self)
if p.valid:
self.poll_sessions.append(p)
await p.start()
else:
await self.bot.say("`poll question;option1;option2 (...)`")
else:
await self.bot.say("`A poll is already ongoing in this channel.`")
async def endpoll(self, message):
if self.getPollByChannel(message):
p = self.getPollByChannel(message)
if p.author == message.author.id: # or isMemberAdmin(message)
await self.getPollByChannel(message).endPoll()
else:
await self.bot.say("`Only admins and the author can stop the poll.`")
else:
await self.bot.say("`There's no poll ongoing in this channel.`")
def getPollByChannel(self, message):
for poll in self.poll_sessions:
if poll.channel == message.channel:
return poll
return False
async def check_poll_votes(self, message):
if message.author.id != self.bot.user.id:
if self.getPollByChannel(message):
self.getPollByChannel(message).checkAnswer(message)
class NewPoll():
def __init__(self, message, main):
self.channel = message.channel
self.author = message.author.id
self.client = main.bot
self.poll_sessions = main.poll_sessions
msg = message.content[6:]
msg = msg.split(";")
if len(msg) < 2: # Needs at least one question and 2 choices
self.valid = False
return None
else:
self.valid = True
self.already_voted = []
self.question = msg[0]
msg.remove(self.question)
self.answers = {}
i = 1
for answer in msg: # {id : {answer, votes}}
self.answers[i] = {"ANSWER" : answer, "VOTES" : 0}
i += 1
async def start(self):
msg = "**POLL STARTED!**\n\n{}\n\n".format(self.question)
for id, data in self.answers.items():
msg += "{}. *{}*\n".format(id, data["ANSWER"])
msg += "\nType the number to vote!"
await self.client.send_message(self.channel, msg)
await asyncio.sleep(settings["POLL_DURATION"])
if self.valid:
await self.endPoll()
async def endPoll(self):
self.valid = False
msg = "**POLL ENDED!**\n\n{}\n\n".format(self.question)
for data in self.answers.values():
msg += "*{}* - {} votes\n".format(data["ANSWER"], str(data["VOTES"]))
await self.client.send_message(self.channel, msg)
self.poll_sessions.remove(self)
def checkAnswer(self, message):
try:
i = int(message.content)
if i in self.answers.keys():
if message.author.id not in self.already_voted:
data = self.answers[i]
data["VOTES"] += 1
self.answers[i] = data
self.already_voted.append(message.author.id)
except ValueError:
pass
def setup(bot):
n = General(bot)
bot.add_listener(n.check_poll_votes, "on_message")
bot.add_cog(n)

199
cogs/mod.py Normal file
View File

@ -0,0 +1,199 @@
import discord
from discord.ext import commands
from .utils import checks
from .utils.dataIO import fileIO
import __main__
import os
main_path = os.path.dirname(os.path.realpath(__main__.__file__))
class Mod:
"""Moderation tools."""
def __init__(self, bot):
self.bot = bot
self.whitelist_list = fileIO(main_path + "/data/mod/whitelist.json", "load")
self.blacklist_list = fileIO(main_path + "/data/mod/blacklist.json", "load")
@commands.command(no_pm=True)
@checks.admin_or_permissions(kick_members=True)
async def kick(self, user : discord.Member):
"""Kicks user."""
try:
await self.bot.kick(user)
await self.bot.say("Done. That felt good.")
except discord.errors.Forbidden:
await self.bot.say("I'm not allowed to do that.")
except Exception as e:
print(e)
@commands.command(no_pm=True)
@checks.admin_or_permissions(ban_members=True)
async def ban(self, user : discord.Member, purge_msg : int=0):
"""Bans user and deletes last X days worth of messages.
Minimum 0 days, maximum 7. Defaults to 0."""
if purge_msg < 0 or purge_msg > 7:
await self.bot.say("Invalid days. Must be between 0 and 7.")
return
try:
await self.bot.ban(user, days)
await self.bot.say("Done. It was about time.")
except discord.errors.Forbidden:
await self.bot.say("I'm not allowed to do that.")
except Exception as e:
print(e)
@commands.group(pass_context=True, no_pm=True)
@checks.mod_or_permissions(manage_messages=True)
async def cleanup(self, ctx):
"""Deletes messages.
cleanup messages [number]
cleanup user [name/mention] [number]
cleanup text \"Text here\" [number]"""
if ctx.invoked_subcommand is None:
await self.bot.say("Type help cleanup for info.")
@cleanup.command(pass_context=True, no_pm=True)
async def text(self, ctx, text : str, number : int):
"""Deletes last X messages matching the specified text.
Example:
cleanup text \"test\" 5
Remember to use double quotes."""
message = ctx.message
cmdmsg = message
if number > 0 and number < 10000:
while True:
new = False
async for x in self.bot.logs_from(message.channel, limit=100, before=message):
if number == 0:
await self.bot.delete_message(cmdmsg)
return
if text in x.content:
await self.bot.delete_message(x)
number -= 1
new = True
message = x
if not new or number == 0:
await self.bot.delete_message(cmdmsg)
break
@cleanup.command(pass_context=True, no_pm=True)
async def user(self, ctx, name : discord.Member, number : int):
"""Deletes last X messages from specified user.
Examples:
cleanup @\u200bTwentysix 2
cleanup Red 6"""
message = ctx.message
cmdmsg = message
if number > 0 and number < 10000:
while True:
new = False
async for x in self.bot.logs_from(message.channel, limit=100, before=message):
if number == 0:
await self.bot.delete_message(cmdmsg)
return
if x.author.id == name.id:
await self.bot.delete_message(x)
number -= 1
new = True
message = x
if not new or number == 0:
await self.bot.delete_message(cmdmsg)
break
@cleanup.command(pass_context=True, no_pm=True)
async def messages(self, ctx, number : int):
"""Deletes last X messages.
Example:
cleanup 26"""
channel = ctx.message.channel
if number > 0 and number < 10000:
async for x in self.bot.logs_from(channel, limit=number+1):
await self.bot.delete_message(x)
@commands.group(pass_context=True)
@checks.admin_or_permissions(ban_members=True)
async def blacklist(self, ctx):
"""Bans user from using the bot"""
if ctx.invoked_subcommand is None:
await self.bot.say("Type help blacklist for info.")
@blacklist.command(name="add")
async def _blacklist_add(self, user : discord.Member):
"""Adds user to bot's blacklist"""
if user.id not in self.blacklist_list:
self.blacklist_list.append(user.id)
fileIO(main_path + "/data/mod/blacklist.json", "save", self.blacklist_list)
await self.bot.say("User has been added to blacklist.")
else:
await self.bot.say("User is already blacklisted.")
@blacklist.command(name="remove")
async def _blacklist_remove(self, user : discord.Member):
"""Removes user to bot's blacklist"""
if user.id in self.blacklist_list:
self.blacklist_list.remove(user.id)
fileIO(main_path + "/data/mod/blacklist.json", "save", self.blacklist_list)
await self.bot.say("User has been removed from blacklist.")
else:
await self.bot.say("User is not in blacklist.")
@commands.group(pass_context=True)
@checks.admin_or_permissions(ban_members=True)
async def whitelist(self, ctx):
"""Users who will be able to use the bot"""
if ctx.invoked_subcommand is None:
await self.bot.say("Type help whitelist for info.")
@whitelist.command(name="add")
async def _whitelist_add(self, user : discord.Member):
"""Adds user to bot's whitelist"""
if user.id not in self.whitelist_list:
if not self.whitelist_list:
msg = "\nAll users not in whitelist will be ignored (owner, admins and mods excluded)"
else:
msg = ""
self.whitelist_list.append(user.id)
fileIO(main_path + "/data/mod/whitelist.json", "save", self.whitelist_list)
await self.bot.say("User has been added to whitelist." + msg)
else:
await self.bot.say("User is already whitelisted.")
@whitelist.command(name="remove")
async def _whitelist_remove(self, user : discord.Member):
"""Removes user to bot's whitelist"""
if user.id in self.whitelist_list:
self.whitelist_list.remove(user.id)
fileIO(main_path + "/data/mod/whitelist.json", "save", self.whitelist_list)
await self.bot.say("User has been removed from whitelist.")
else:
await self.bot.say("User is not in whitelist.")
def check_folders():
folders = ("data", "data/mod/")
for folder in folders:
if not os.path.exists(folder):
print("Creating " + folder + " folder...")
os.makedirs(folder)
def check_files():
if not os.path.isfile(main_path + "/data/mod/blacklist.json"):
print("Creating empty blacklist.json...")
fileIO(main_path + "/data/mod/blacklist.json", "save", [])
if not os.path.isfile(main_path + "/data/mod/whitelist.json"):
print("Creating empty whitelist.json...")
fileIO(main_path + "/data/mod/whitelist.json", "save", [])
def setup(bot):
check_folders()
check_files()
bot.add_cog(Mod(bot))

214
cogs/trivia.py Normal file
View File

@ -0,0 +1,214 @@
import discord
from discord.ext import commands
from random import randint
from random import choice as randchoice
import datetime
import time
import os
import asyncio
settings = {"TRIVIA_MAX_SCORE" : 10, "TRIVIA_TIMEOUT" : 120, "TRIVIA_DELAY" : 15, "TRIVIA_BOT_PLAYS" : False}
class Trivia:
"""General commands."""
def __init__(self, bot):
self.bot = bot
self.trivia_sessions = []
@commands.command(pass_context=True)
async def trivia(self, ctx, list_name : str=None):
"""Start a trivia session with the specified list
Stop parameter will end the current session
"""
message = ctx.message
if list_name == None:
await self.triviaList(ctx.message.author)
elif list_name.lower() == "stop":
if await getTriviabyChannel(message.channel):
s = await getTriviabyChannel(message.channel)
await s.endGame()
await self.bot.say("`Trivia stopped.`")
else:
await self.bot.say("`There's no trivia session ongoing in this channel.`")
elif not await getTriviabyChannel(message.channel):
t = TriviaSession(message)
self.trivia_sessions.append(t)
await t.loadQuestions(message.content)
else:
await self.bot.say("`A trivia session is already ongoing in this channel.`")
async def triviaList(self, author):
msg = "**Available trivia lists:** \n\n```"
lists = os.listdir("data/trivia/")
if lists:
clean_list = []
for txt in lists:
if txt.endswith(".txt") and " " not in txt:
txt = txt.replace(".txt", "")
clean_list.append(txt)
if clean_list:
for i, d in enumerate(clean_list):
if i % 4 == 0 and i != 0:
msg = msg + d + "\n"
else:
msg = msg + d + "\t"
msg += "```"
await self.bot.send_message(author, msg)
else:
await self.bot.say("There are no trivia lists available.")
else:
await self.bot.say("There are no trivia lists available.")
class TriviaSession():
def __init__(self, message):
self.gaveAnswer = ["I know this one! {}!", "Easy: {}.", "Oh really? It's {} of course."]
self.currentQ = None # {"QUESTION" : "String", "ANSWERS" : []}
self.questionList = ""
self.channel = message.channel
self.scoreList = {}
self.status = None
self.timer = None
self.count = 0
async def loadQuestions(self, msg):
msg = msg.split(" ")
if len(msg) == 2:
_, qlist = msg
if qlist == "random":
chosenList = randchoice(glob.glob("data/trivia/*.txt"))
self.questionList = self.loadList(chosenList)
self.status = "new question"
self.timeout = time.perf_counter()
if self.questionList: await self.newQuestion()
else:
if os.path.isfile("data/trivia/" + qlist + ".txt"):
self.questionList = self.loadList("trivia/" + qlist + ".txt")
self.status = "new question"
self.timeout = time.perf_counter()
if self.questionList: await self.newQuestion()
else:
await triviaManager.bot.say("`There is no list with that name.`")
await self.stopTrivia()
else:
await triviaManager.bot.say("`trivia [list name]`")
async def stopTrivia(self):
self.status = "stop"
triviaManager.trivia_sessions.remove(self)
async def endGame(self):
self.status = "stop"
if self.scoreList:
await self.sendTable()
triviaManager.trivia_sessions.remove(self)
def loadList(self, qlist):
with open(qlist, "r", encoding="utf-8") as f:
qlist = f.readlines()
parsedList = []
for line in qlist:
if "`" in line and len(line) > 4:
line = line.replace("\n", "")
line = line.split("`")
question = line[0]
answers = []
for l in line[1:]:
answers.append(l.lower())
if len(line) >= 2:
line = {"QUESTION" : question, "ANSWERS": answers} #string, list
parsedList.append(line)
if parsedList != []:
return parsedList
else:
self.stopTrivia()
return None
async def newQuestion(self):
for score in self.scoreList.values():
if score == settings["TRIVIA_MAX_SCORE"]:
await self.endGame()
return True
if self.questionList == []:
await self.endGame()
return True
self.currentQ = randchoice(self.questionList)
self.questionList.remove(self.currentQ)
self.status = "waiting for answer"
self.count += 1
self.timer = int(time.perf_counter())
await triviaManager.bot.say("**Question number {}!**\n\n{}".format(str(self.count), self.currentQ["QUESTION"]))
while self.status != "correct answer" and abs(self.timer - int(time.perf_counter())) <= settings["TRIVIA_DELAY"]:
if abs(self.timeout - int(time.perf_counter())) >= settings["TRIVIA_TIMEOUT"]:
await triviaManager.bot.say("Guys...? Well, I guess I'll stop then.")
await self.stopTrivia()
return True
await asyncio.sleep(1) #Waiting for an answer or for the time limit
if self.status == "correct answer":
self.status = "new question"
await asyncio.sleep(3)
if not self.status == "stop":
await self.newQuestion()
elif self.status == "stop":
return True
else:
msg = randchoice(self.gaveAnswer).format(self.currentQ["ANSWERS"][0])
if settings["TRIVIA_BOT_PLAYS"]:
msg += " **+1** for me!"
self.addPoint(self.bot.user.name)
self.currentQ["ANSWERS"] = []
await triviaManager.bot.say(msg)
await triviaManager.bot.send_typing(self.channel)
await asyncio.sleep(3)
if not self.status == "stop":
await self.newQuestion()
async def sendTable(self):
self.scoreList = sorted(self.scoreList.items(), reverse=True, key=lambda x: x[1]) # orders score from lower to higher
t = "```Scores: \n\n"
for score in self.scoreList:
t += score[0] # name
t += "\t"
t += str(score[1]) # score
t += "\n"
t += "```"
await triviaManager.bot.say(t)
async def checkAnswer(self, message):
self.timeout = time.perf_counter()
for answer in self.currentQ["ANSWERS"]:
if answer in message.content.lower():
self.currentQ["ANSWERS"] = []
self.status = "correct answer"
self.addPoint(message.author.name)
await triviaManager.bot.send_message(message.channel, "You got it {}! **+1** to you!".format(message.author.name))
await triviaManager.bot.send_typing(self.channel)
return True
def addPoint(self, user):
if user in self.scoreList:
self.scoreList[user] += 1
else:
self.scoreList[user] = 1
def getTriviaQuestion(self):
q = randchoice(list(trivia_questions.keys()))
return q, trivia_questions[q] # question, answer
async def getTriviabyChannel(channel):
for t in triviaManager.trivia_sessions:
if t.channel == channel:
return t
return False
async def checkMessages(message):
if message.author.id != triviaManager.bot.user.id:
if await getTriviabyChannel(message.channel):
trvsession = await getTriviabyChannel(message.channel)
await trvsession.checkAnswer(message)
def setup(bot):
global triviaManager
bot.add_listener(checkMessages, "on_message")
triviaManager = Trivia(bot)
bot.add_cog(triviaManager)

0
cogs/utils/__init__.py Normal file
View File

69
cogs/utils/checks.py Normal file
View File

@ -0,0 +1,69 @@
from discord.ext import commands
import discord.utils
import os.path
import json
import __main__
#
# This is a modified version of checks.py, originally made by Rapptz
#
# https://github.com/Rapptz
# https://github.com/Rapptz/RoboDanny/tree/async
#
main_path = os.path.dirname(os.path.realpath(__main__.__file__))
try:
with open(main_path + "/data/red/settings.json", "r") as f:
settings = json.loads(f.read())
except:
settings = {"OWNER" : False, "ADMIN_ROLE" : False, "MOD_ROLE" : False}
def is_owner_check(ctx):
return ctx.message.author.id == owner
def is_owner():
return commands.check(is_owner_check)
# The permission system of the bot is based on a "just works" basis
# You have permissions and the bot has permissions. If you meet the permissions
# required to execute the command (and the bot does as well) then it goes through
# and you can execute the command.
# If these checks fail, then there are two fallbacks.
# A role with the name of Bot Mod and a role with the name of Bot Admin.
# Having these roles provides you access to certain commands without actually having
# the permissions required for them.
# Of course, the owner will always be able to execute commands.
def check_permissions(ctx, perms):
if is_owner_check(ctx):
return True
ch = ctx.message.channel
author = ctx.message.author
resolved = ch.permissions_for(author)
return all(getattr(resolved, name, None) == value for name, value in perms.items())
def role_or_permissions(ctx, check, **perms):
if check_permissions(ctx, perms):
return True
ch = ctx.message.channel
author = ctx.message.author
if ch.is_private:
return False # can't have roles in PMs
role = discord.utils.find(check, author.roles)
return role is not None
def mod_or_permissions(**perms):
def predicate(ctx):
return role_or_permissions(ctx, lambda r: r.name in (settings["MOD_ROLE"], settings["ADMIN_ROLE"]), **perms)
return commands.check(predicate)
def admin_or_permissions(**perms):
def predicate(ctx):
return role_or_permissions(ctx, lambda r: r.name == settings["ADMIN_ROLE"], **perms)
return commands.check(predicate)

28
cogs/utils/dataIO.py Normal file
View File

@ -0,0 +1,28 @@
import json
def fileIO(filename, IO, data=None):
if IO == "save" and data != None:
with open(filename, encoding='utf-8', mode="w") as f:
f.write(json.dumps(data))
elif IO == "load" and data == None:
with open(filename, encoding='utf-8', mode="r") as f:
return json.loads(f.read())
elif IO == "check" and data == None:
try:
with open(filename, encoding='utf-8', mode="r") as f:
return True
except:
return False
else:
raise("Invalid fileIO call")
def get_value(filename, key):
with open(filename, encoding='utf-8', mode="r") as f:
data = json.loads(f.read())
return data[key]
def set_value(filename, key, value):
data = fileIO(filename, "load")
data[key] = value
fileIO(filename, "save", data)
return True

View File

@ -0,0 +1 @@
{"playlist": ["https://www.youtube.com/watch?v=6sxnXO2RjVg", "https://www.youtube.com/watch?v=gj0Rz-uP4Mk", "https://www.youtube.com/watch?v=_izUd1S1BX0", "https://www.youtube.com/watch?v=K39qFmvbdww", "https://www.youtube.com/watch?v=ZFo8-JqzSCM", "https://www.youtube.com/watch?v=zD80CostTV0", "https://www.youtube.com/watch?v=mWADuNREJnY", "https://www.youtube.com/watch?v=xelUdXAvDVU", "https://www.youtube.com/watch?v=A2ptDgMOzc0", "https://www.youtube.com/watch?v=YwHrx0r0t2s", "https://www.youtube.com/watch?v=jqxNSvFMkag", "https://www.youtube.com/watch?v=gHgphqx1KT4", "https://www.youtube.com/watch?v=6sxnXO2RjVg", "https://www.youtube.com/watch?v=inb1z-qjxIU", "https://www.youtube.com/watch?v=fZZD8ckwLJA", "https://www.youtube.com/watch?v=xFn9V-VpkQ4", "https://www.youtube.com/watch?v=X7pjP_XkK4U", "https://www.youtube.com/watch?v=QPwPDDz-5Uo", "https://www.youtube.com/watch?v=6jmNe77vces", "https://www.youtube.com/watch?v=dga_ds1bJKg", "https://www.youtube.com/watch?v=oPmaVT-P5Ds", "https://www.youtube.com/watch?v=Ud_JZcC0tHI", "https://www.youtube.com/watch?v=35Cy7DUltYo", "https://www.youtube.com/watch?v=ZvmGLV_GE0M", "https://www.youtube.com/watch?v=7CXFXB4uknI", "https://www.youtube.com/watch?v=4pgbJaKemic", "https://www.youtube.com/watch?v=Jp6j5HJ-Cok", "https://www.youtube.com/watch?v=lzQ8GDBA8Is", "https://www.youtube.com/watch?v=Jt0mg8Z09SY", "https://www.youtube.com/watch?v=I6JZW7zMDfY", "https://www.youtube.com/watch?v=V2u-6XkB9O4", "https://www.youtube.com/watch?v=-ziSLGVQOSg", "https://www.youtube.com/watch?v=XFuAeGdUXQE", "https://www.youtube.com/watch?v=kHmoO_a4dDw", "https://www.youtube.com/watch?v=5XXe_5k_kno", "https://www.youtube.com/watch?v=Rk6YDzmqZ0I", "https://www.youtube.com/watch?v=5MgRt8zdr1I", "https://www.youtube.com/watch?v=50blPXs_F94", "https://www.youtube.com/watch?v=UrGLNtZ0rEg", "https://www.youtube.com/watch?v=atCwKBeq76w", "https://www.youtube.com/watch?v=QdfRZXsqDvc", "https://www.youtube.com/watch?v=lXgzQQ5XsHc", "https://www.youtube.com/watch?v=MAGoqMZRLB4", "https://www.youtube.com/watch?v=T1Ond-OwgU8", "https://www.youtube.com/watch?v=J-gkchrZIOU", "https://www.youtube.com/watch?v=3jrIK7YB0tE", "https://www.youtube.com/watch?v=RFxRTLmtsbE", "https://www.youtube.com/watch?v=0XSaKQlBZuE", "https://www.youtube.com/watch?v=cN-nfmrbvno", "https://www.youtube.com/watch?v=cUWyODR1_sA", "https://www.youtube.com/watch?v=uZ1a6hqxyJo", "https://www.youtube.com/watch?v=_sRkoZ-rbys", "https://www.youtube.com/watch?v=wdEibF6PXKY", "https://www.youtube.com/watch?v=KssCCe6KWcg", "https://www.youtube.com/watch?v=j3e_y9Bc7hs", "https://www.youtube.com/watch?v=QaP2vOdltP0", "https://www.youtube.com/watch?v=-n4kcvGS_Lk", "https://www.youtube.com/watch?v=e65ofKU6X6A", "https://www.youtube.com/watch?v=RDQsAvmPuT8", "https://www.youtube.com/watch?v=AFFaEgk-zeg", "https://www.youtube.com/watch?v=6aEx2xL37lw", "https://www.youtube.com/watch?v=H2GxBxeQGqA", "https://www.youtube.com/watch?v=Q_eE0NPArEY", "https://www.youtube.com/watch?v=WR8sxX0GoFo", "https://www.youtube.com/watch?v=Z_oIZzvSxeE", "https://www.youtube.com/watch?v=xL4oPjTACPo", "https://www.youtube.com/watch?v=aIz1cPfTRW4", "https://www.youtube.com/watch?v=DHG5-GxI_Es", "https://www.youtube.com/watch?v=VdqL8nbNbKg", "https://www.youtube.com/watch?v=mc7oGWgeA8s", "https://www.youtube.com/watch?v=clBEj47wjJM", "https://www.youtube.com/watch?v=Dsagy_qrjwc"], "author": "X"}

View File

@ -0,0 +1 @@
{"playlist": ["https://www.youtube.com/watch?v=YQ3mpGL0VY8", "https://www.youtube.com/watch?v=blnFOd7r1bQ", "https://www.youtube.com/watch?v=9y_GotF6CTM", "https://www.youtube.com/watch?v=kCOEfyEn7eI", "https://www.youtube.com/watch?v=zQPwKaNCIOM", "https://www.youtube.com/watch?v=Xb-XKrT4CrI", "https://www.youtube.com/watch?v=SqVSMucFDWk", "https://www.youtube.com/watch?v=c5kZPNiz9NI", "https://www.youtube.com/watch?v=x7oKSOUHol0", "https://www.youtube.com/watch?v=W-0u5cCzvIU", "https://www.youtube.com/watch?v=x4ZvQuaRQCY", "https://www.youtube.com/watch?v=ft0q1DSDrGU", "https://www.youtube.com/watch?v=KGxfhFW1N1k", "https://www.youtube.com/watch?v=ZePfzgdD7Lo", "https://www.youtube.com/watch?v=HZKMahE12JM", "https://www.youtube.com/watch?v=cCHgXbs-3Xk", "https://www.youtube.com/watch?v=R99D2HJ_xNI", "https://www.youtube.com/watch?v=ut6Ag6cEFEE", "https://www.youtube.com/watch?v=vQt0yJ7xdAU", "https://www.youtube.com/watch?v=PD-glmz2LHM", "https://www.youtube.com/watch?v=aDdO2PHo7Fc", "https://www.youtube.com/watch?v=p9NGaYbQYCk", "https://www.youtube.com/watch?v=LWPDuX6czUk", "https://www.youtube.com/watch?v=mXe5zkoULqE", "https://www.youtube.com/watch?v=gaZPSqXxD3w", "https://www.youtube.com/watch?v=6CgQq0_lPQ8", "https://www.youtube.com/watch?v=ybE4QlpYK-E", "https://www.youtube.com/watch?v=5WMk862bRxo", "https://www.youtube.com/watch?v=7h_CC_OwoVM", "https://www.youtube.com/watch?v=TkxxF3vds5c", "https://www.youtube.com/watch?v=oTf4poNfRcE", "https://www.youtube.com/watch?v=h4Iz3r6sz5o", "https://www.youtube.com/watch?v=vz58xkToEww", "https://www.youtube.com/watch?v=hQ0WA9KUYzA", "https://www.youtube.com/watch?v=jk96CbY5L6Y", "https://www.youtube.com/watch?v=haMZsdgS9kk", "https://www.youtube.com/watch?v=iKaqohXoWB4", "https://www.youtube.com/watch?v=PRHHODId5Oc", "https://www.youtube.com/watch?v=8MYWwKE47Ds", "https://www.youtube.com/watch?v=yGwxVYwtiQ8", "https://www.youtube.com/watch?v=V4steXh0pYc", "https://www.youtube.com/watch?v=8jV4ptto7AY", "https://www.youtube.com/watch?v=uOpS4y1hMSU", "https://www.youtube.com/watch?v=fa3VZ6Y0lUs", "https://www.youtube.com/watch?v=dsJBa1pV46I"], "author": "X"}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
{"playlist": ["https://www.youtube.com/watch?v=gziaF9VT2D4", "https://www.youtube.com/watch?v=7Okz5qov7Go", "https://www.youtube.com/watch?v=olmgSyTtiwI", "https://www.youtube.com/watch?v=tQFMDOQXW30", "https://www.youtube.com/watch?v=Q4lN5HRjWCQ", "https://www.youtube.com/watch?v=UMlnE9QWma0", "https://www.youtube.com/watch?v=ix6V-l-ro1o", "https://www.youtube.com/watch?v=PdjYXcQPbig", "https://www.youtube.com/watch?v=e9mcNVTpovE", "https://www.youtube.com/watch?v=v3bAw8G-qQ4", "https://www.youtube.com/watch?v=WczTbnB0_lE", "https://www.youtube.com/watch?v=e05sBkIz2h0", "https://www.youtube.com/watch?v=fklAh1ncxng", "https://www.youtube.com/watch?v=t6Xwj1lVZFc", "https://www.youtube.com/watch?v=0IfjbF8aY4o", "https://www.youtube.com/watch?v=sLZ7RCxMCO4"], "author": "X"}

View File

@ -0,0 +1 @@
{"playlist": ["https://www.youtube.com/watch?v=pfAuWjCXwnw", "https://www.youtube.com/watch?v=ToLBU-zJ2S0", "https://www.youtube.com/watch?v=Z-7OySB0Yb4", "https://www.youtube.com/watch?v=91jSk2G6Dr0", "https://www.youtube.com/watch?v=pbTgi_gLppQ", "https://www.youtube.com/watch?v=8keRZa7hAqM", "https://www.youtube.com/watch?v=XfHdXHqWZyE", "https://www.youtube.com/watch?v=NkYxsnWj8Ds", "https://www.youtube.com/watch?v=XSGxYnnwcLg", "https://www.youtube.com/watch?v=ieTtWb7oHIo", "https://www.youtube.com/watch?v=y2F1BL_p5jk", "https://www.youtube.com/watch?v=Waf_AcAfPWA", "https://www.youtube.com/watch?v=dcx3mzLySew", "https://www.youtube.com/watch?v=-VruEefJAHI", "https://www.youtube.com/watch?v=EUxNv_9Zxns", "https://www.youtube.com/watch?v=C3yP_-lOhzA", "https://www.youtube.com/watch?v=cpjh4_ReUCw", "https://www.youtube.com/watch?v=urmoWFQw4aE", "https://www.youtube.com/watch?v=TAzxVL-xWww", "https://www.youtube.com/watch?v=zve5kLOjITU", "https://www.youtube.com/watch?v=2QceNDYmbAo", "https://www.youtube.com/watch?v=DV8zA27UdVU", "https://www.youtube.com/watch?v=uPQMYfXLpKo"], "author": "X"}

184
data/trivia/anime.txt Normal file
View File

@ -0,0 +1,184 @@
Which genre is aimed at girls between 10-18?`shoujo
In Full Metal Alchemist, what is Edward's and Alphonse's last name?`Elric
Which series features a location called the Soul Society?`Bleach
In Neon Genesis Evangelion, who is the pilot of Unit-02?`asuka langley-soryu`asuka langley soryu
What is Kazuki Takahashi best known as the creator of?`yu-gi-oh`yu-gi-oh!
In yaoi pairing, what is the "receiving", "bottom", or passive partner known as?`uke
In yaoi pairing, what is the "top" or dominant partner known as?`seme
In Cowboy Bebop, what is the villan Vicious's weapon of choice?`katana
In Death Note, who is the second Kira?`Misa Amane`misa
In Death Note, who is the first Kira?`Light Yagami`Light
In Death Note, who is the third Kira?`Kyosuke Higuchi`Kyosuke
Usagi Tsukino is better known as...?`Sailor Moon
What is a popular anime/manga character archetype that derives from the Japanese pronunciation of the English word 'cool'?`kuudere`coodere
What is a Japanese term for a character development process that describes a person who is initially cold and even hostile towards another person before gradually showing their warm side over time?`tsundere
In the original Japanese version of Pokemon, what is Ash Ketchum's name?`Satoshi
What is the relationship between Hinata and Hanabi Hyuga related in Naruto?`cousins`cousin
Who was Minako's crime-fighting alter ego before she became Sailor Venus?`sailor v
In 'Magic Knight Rayearth', the three heroines, Hikaru, Umi and Fuu, have powers associated with different elements. What kind of elemental spells does Umi use?`water
Which ballet-themed magical girl anime features Ahiru, a duck who is turned into a human girl by an old storyteller?`Princess tutu
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
Which 2011 magical girl anime features Grief Seeds, witches, a mysterious white creature called Kyubey, and the characters Homura, Sayaka and Mami?`Puella Magi Madoka Magica
In what CLAMP Animé is there a little Persocon named Chii?`Chobits
For which anime were these songs written: "Cha La Head Cha La" and "Boku-tachi wa Tenshi Datta"?`Dragon Ball Z
Which manga made by CLAMP was named after a plant?`clover
After Watase Yuu's creation of "Fushigi Yuugi", which famous shoujo anime did she make?`Ayashi no Ceres
In "Cowboy Bebop", who dies?`Spike
In "Fooly Cooly", how many manga-like (comic-like) scenes are there in total?`2`two
In InuYasha, who was the demon of hair?`Yura
In InuYasha, who is the leader of the wolf demons?`Koga`kouga
Who is mistaken for a boy in the anime Ouran High School Host Club?`Haruhi
What are the Sailor Senshi named after?`Planets
What country does Hellsing take place in?`England
Sakura, Sasuke, Rock Lee, and Kakashi are all characters from which anime?`Naruto
InuYasha is half __ demon?`dog
Which anime involves a Corgi hound named Ein as one of the characters?`cowboy bebop
In Code Geass, the character Li Xingke is a member of which group?`the chinese federation`chinese federation
In Code Geass, the leader of the Four Holy Swords is named...?`General Kyoshiro Tohdoh`general tohdoh`kyoshiro tohdoh`tohdoh
In Code Geass, what was the white Knightmare Frame piloted by Suzaku called?`Lancelot
In Code Geass, what was the name of the academy Lelouch went to?`Ashford Academy`Ashford
In Revolutionary Girl Utena, which character turns into a cow in one episode?`Nanami
What was Taichi Kamiya's first Digimon?`Botamon
The world of Fushigi Yuugi is based on the ancient form of what country?`China
How many members of Chronos (Black Cat) were there originally?`13`thirteen
In Ranma 1/2, what does Ryouga turn into when he gets doused with cold water?`pig`a pig
Sakuragi Hanamichi (Slam Dunk) plays what position for Shohoku?`Power Forward
What is the name of Koyuki's (BECK) love interest?`Maho
What is the default way the Death Note kills?`cardiac paralysis
What is the name of the final Gundam used by Shiro in 08th MS Team?`Ez-8.
Name the samurai girl in Love Hina?`Aoyama `Aoyama Motoko
Luffy (One Piece) ate what Devil Fruit?`Gomu Gomu`gum gum
What is the name of Hitsugaya Toshirou's (Bleach) Zanpakutou?`Hyourinmaru
Colonel Roy Mustang (Full Metal Alchemist) is also known as the Alchemist of__?`Flame
What is Shiki's weapon of choice in Shingetsutan Tsukihime?`Dagger
What is Ranma (Ranma 1/2) most afraid of?`cats`cat
What is Youko (Inukami) most afraid of?`dogs`dog
How many blades does Tsumura Tokiko (Busou Renkin) have on her thighs?`4`four
In Detective Conan, what is Shinichi Kudo's best sport?`soccer`football
Inuyasha's sword is called what?`Tessaiga`Tetsusaiga
What is Matsuri's (Ichigo Mashimaro) pet ferret called?`John
Name one of Sarutobi's disciples (Naruto)?`Orochimaru`Jiraiya`Tsunade
How many rounds of ammunition does Gundam Wing Zero Custom's Buster Rifle have?`3`three
Who does Orikasa Fumiko voice in Bleach?`Rukia
What is the original Gundam?`RX-78
Who is the main character of Hoshin Engi?`Taikoubou
Which Hayao Miyazaki movie was based off of a book by a British author named Dianna Wynne Jones?`Castle in the sky
What anime character type is known as a quiet and often antisocial character?`dandere
What character type is very loving and gentle to someone before their devotion becomes destructive in nature, often through violence and/or brutality?`yandere
Maka Albarn is from what anime?`soul eater
What is name for the rabbit-like creatures from Clamp?`mokona
When was the first known Japanese animation produced?`1917
Pokemon, one of the most popular and well known anime characters, was created by Stoshi Tajiri in which year?`1996
Which hit Anime film premiered in Japan in 1996, starring Kenshiro as the main character?`Fist of the North Star
Which year was the American adaptation of Digimon: The Movie released?`2000
Which 1993 anime hit set in Feudal Japan involved the Yamashiro Clan?`ninja scroll
It's common in anime for a character to pull their lower eyelid down to taunt someone. What is this called?`akanabe
The practice of dressing up like anime characters in Japan is called?`cosplay
At the very end of Code Geass, how many characters were aware of Lelouch's true intentions?`4`four
As of 2015, among all the 17 long anime movies Hayao Miyazaki participated in, how many did he direct?`11`eleven
In what year did studio MAPPA release its first normal-length independent anime series?`2014
In To-LOVE Ru, who between the Deviluke twins is younger?`momo
How many races exist in Disboard, the fantasy world of No Game No Life?`16`sixteen
Out of which material are Train Heartnet's (Black Cat) gun and bullets mainly made of?`orichalcum
Who is the main character of Black Cat?`Train Heartnet
Who is the British monarch in Black Butler's time period?`Victoria I`Queen Victoria I
In Gekkan Shoujo Nozaki-kun, what animal appears very often?`raccoon
What character type is a heroine that started as a villain trying to kill the protagonist but then switched to his side after falling in love with him?`mayadere
What real country does Zero no Tsukaima's Tristain replace?`belgium`netherlands`the netherlands
In what year did Neon Genesis Evangelion start airing?`1995
What creature can Karuta Roromiya (Inu x Boku SS) transform into?`Giant Skeleton`skeleton
To what creature is Takeo Gouda (Ore Monogatari) sometimes compared?`ogre
What game is the focus of Shion no Ou?`shougi
What type of handgun does Kinji Tohyama mainly use (Hidan no Aria)?`beretta
Who was the first master of Fairy Tail?`Mavis
Where is the location of Fairy Tail?`Magnolia
What starter pokemon did Ash Ketchum originally intend to choose?`Squirtle
What number is painted on the side of Speed Racer's car?`5`five
How many men did Eren kill during the scene in which he rescued the kidnapped Misaka when they were children (Shingeki no Kyojin)?`2`two
Who kills Frieza?`Future Trunks`Trunks
Who sacrifices his life for Gohan from an incoming blast from Nappa in the Saiyan Saga?`Piccolo
Which android is the only one who marries (Dragon Ball Z)?`18
What is the name of Aang's flying bison in The Last Airbender?`Appa
What is the name of the Shinigami that owns the Death Note Light Yagami uses?`Ryuk
What is the last name of the cursed family Tohru stays with in Fruits Basket?`Sohma
What game does Lelouch skip school to play in Code Geass?`chess
Who does Holy Rome have a crush on in Hetalia?`Italy
What is the name of Shiro's cat in K Project?`neko
Who is it that is obsessed with water in Free, Iwatobi Swim Club?`Haru
Who does Inuyasha mistake Kagome for?`Kikyo
What is the name of the hot tempered bar tender with super human strength in Durarara?`Shizuo
What is the second game Kirito goes into in Sword Art Online?`Alfheim Online`Alfheim
What are zombie's sensitive to in Highschool Of The Dead?`sound
What is the name of the blond haired boy in Clannad?`youhei
What is the name of the dragon that raised Natsu in Fairy Tail?`Igneel
What is number thirteen's Real Name in Black Cat?`train heartnet
What is the name of the evil prince that tries to capture Aang in The Last Airbender?`prince zuko`zuko
Who did America grow up with in Hetalia?`England
What is the kind of animal does Momiji turn into in Fruits Basket?`rabbit`bunny
In Scrapped Princess, what is the name of the boy who proposes to Pacifica?`Leo
In Love Hina Christmas special, what did Keitarou buy Naru?`Coat`jacket
In Chobits what is the first thing that came on the screen in episode 1?`cow
In Yakitate!! Japan, Kawachi obtained what?`solar gauntlets
In Fushigi Yuugi, Miaka is the priestess of what?`Suzaku
In Trigun, what was Vash's brother called?`Knife
In Kingdom Hearts, what is Squall's alias?`Leon
In InuYasha, what is the name of the baby that Naraku holds his human heart in?`Hakudoshi
In Final Fantasy V, who dies halfway through the game?`Krile Mayer Baldesion`Krile Baldesion`Krile
What squad is Toushiro Hitsugaya the captain of (Bleach)?`10`10th`tenth`ten
Who cut Sakura's hair off (Naruto)?`Sakura
Where did Lucy get her fairy tail mark?`Right hand`back of right hand`hand
What's the bounty on Roronoa Zoro's head?`120,000,000`120000000
Who gave Kakashi his Sharingan eye?`Obito Uchiha`Obito
How many times have Ichigo and Renji battled?`2`two
From the Rave Master, what's 3713 real name?`Elie
In Naruto, who is Negi's cousin?`Hinata Hyuga`Hinata
In Yu Yu Hakasho, what is Yuskey's close advisor and ghost friend?`Botan
In Fruts Basket, what spirit is Akito possessed by?`God
Basketball Anime that came out in 2012?`Kuroko No Basket
English name of Kuroshitsuji?`Black Butler
Who is the main character in Attack on Titan?`Eren Yeager`Eren
Which character loves to eat in Attack on Titan?`Sasha Blouse`Sasha
(Attack on Titan) What is the outer wall named (The one taken by the titans)?`Wall Maria`Maria
Type of anime aimed at young boys under the age of fifteen?`shonen
Type of anime aimed at young men between the ages of 15-24?`seinen
Type of anime aimed at adult women?`josei
Type of anime largely focused on one distinct aspect: pilotable robots?`mecha`robot
Type of anime about innocent young girls using a magical object to transform into a superhero version of themselves?`magical girl`mahou shoujo`majokko
Type of anime which do not show sexual intercourse or genitalia, but sexual themes are referenced?`ecchi
Type of anime where one male character, the protagonist, at the center of a group of female characters who are all vying for his romantic affections?`harem
In the anime called "Shugo chara", how many eggs does Amu have?`4`four
In the anime called 'Tsubasa Chronicle', what does the gang needed to collect?`Princess Sakura's feathers`feathers
What Zodiac animal is Kyo Sohma(Fruits Basket)?`cat
What did Ed sacrifice in order to seal his brother's soul into a suit of armour (Full Metal Alchemist)?`right arm`arm
What is the automotive armored prostheses as used in the Fullmetal Alchemist universe?`automail
What color is Kyo's spell book (Zatch Bell)?`red
What is the name of Emily's bitbeast (Beyblade)?`Trygator
What type of animal power does Kiki have (Mew Mew Power)?`monkey
What is the name of Sango's demon cat (Inuyasha)?`kirara
(Bleach) Human mediums, having the ability to detect the existence of Hollows?`Quincy
(Bleach) What is a Hollow that has removed its mask and has gained Shinigami-like powers?`Arrancar
What year was the One Piece manga created?`1997
Who is the Pirate King in One Piece?`Gol D. Roger`Gol D Roger
In "Fooly Cooly", there are a couple of scenes where you see the commander getting a haircut. What popular show's animation resembles the special animation in this scene?`South Park
In "Saikano", one of Shuji's friends mentions how only his lunches and the military's lunches have fresh meat in them. Who made the lunch Shuji was eating that day?`Chise
In "Yu Yu Hakusho", what level computer does Mitari have to fight in Game Master's territory?`7`seven
In "Fullmetal Alchemist", who kills Hughes?`Envy
What is the name of Naruto's son?`Boruto Uzumaki`Boruto
What is the special Kekkei Genkai/Bloodline Limit of the Hyuga clan (Naruto)?`Byakugan
Which jutsu does Rock Lee use?`taijutsu
What animal does the one-tailed beast resemble (Naruto)?`Tanuki`Japanese Raccoon Dog`Raccoon
What is the name of the nine-tailed beast (Naruto)?`Kurama
Who is the protagonist of One Punch Man?`Saitama
What city does Saitama live in (One Punch Man)?`Z-city`z city`z
What city is the headquarters of the Hero Association in (One Punch Man)?`A-city`A city`A
Who is the Rank 1 Class S Hero (One Punch Man)?`Blast
How many dragon balls are there?`7`seven
Who does a complete set of dragon balls summon?`Shenron
What race is Piccolo?`Namekian`Nameks
Who is the love interest of Sailor Moon?`Tuxedo Mask`Mamoru Chiba`Mamoru`Endymion
What is the graduation rate at Totsuki Culinary Academy (Shokugeki No Soma)?`1%`1`One
What is the name of the Culinary Academy in Shokugeki No Soma?`Totsuki Culinary Academy`Totsuki
What is the term referring to a cooking duel allows students to settle debates and arguments (Shokugeki no Soma)?`shokugeki
(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

160
data/trivia/games.txt Normal file
View File

@ -0,0 +1,160 @@
What game made popular the phrase "Do a barrel roll?"`Star Fox 64
Who is the main character from Final Fantasy VII?`Cloud Strife
What is Mario's surname?`Mario
What was Mario's original name?`Jumpman
In what game did Mario make his first appearance?`Donkey Kong
Who was Sega's mascot?`Sonic the Hedgehog`Sonic
Who is the main character of Final Fantasy VIII?`Squall Leonhart`Squall
What game mixed both Disney characters with Final Fantasy characters?`Kingdom Hearts
Who is the main character in Kingdom Hearts?`Sora
In the original Kingdom Hearts, who is Sora looking for?`Kairi
Who is the main character from Final Fantasy IX?`Zidane Tribal
In what series of video games did Master Chief appear?`Halo
What video game made the Golden Gun famous?`Goldeneye
Gran Turismo is exclusive to 1 console, what is it?`Sony Playstation
Who is Harry Potter's best friend in the game "Harry Potter and the Chamber of Secrets"?`Ron Weasley
What role do you play in the game "Pacific Strike"?`American pilot
What famous monkey had a considerable role in turning Nintendo into the company they are today?`Donkey Kong
IN the "Final Fantasy X", where is blitzball played?`Underwater
What was the name of the four-armed sub-boss in the original "Mortal Kombat"?`Goro
In the Xbox game "Halo", what is the name of the main character?`Master Chief
Which famous skateboarder has his name on a skateboard video game series?`Tony Hawk
Which type of game is "Mortal Kombat"?`Fighting
In "Animal Crossing: Wild World", what wildlife is found in the town observatory?`Owl
At what level do you get the Hadouken Fireball in "Mega Man X"?`Armored Armadillo Stage
What color is the big truck pictured on the cover of "Excite Truck"?`Red
Who is the voice for 3DO's Gex?`Dana Gould
The game "Kingdom of Hearts" is the story of a boy of what name?`Sora
What was the last Ridge Racer" game in arcades before "Ridge Racer V"?`Rave Racer
How many years after the events of Soulcalibur IV do the events of Soulcalibur V take place?`17`17 years
What is the theme of the game "Golden Nugget 64"?`Gambling
In Vegas, what color is traditionally used for the zero in a roulette wheel?`Green
IN the official Monopoly rules, what happens when you land on "Free Parking"?`Nothing
Along with the Z, what title has the highest value (10) in Scrabble?`Q
In Monopoly, what is the rental on Boardwalk with one house?`200
How many possible opening moves are there in a game of draughts?`7
How many counters does a player start with in Backgammon?`15
In the Game of Life, what are the playing pieces that you move around the board?`Cars
Who is the aging hippie ex-marijuana farmer in "GTA: San Andreas"?`The Truth
"Call of Duty: Ghosts" is what number primary installment in the COD series?`Ten`10`Tenth`10th
What number in the series is "Medal of Honor: Frontline"?`Fourth`Four`4`4th
What part of a prehistoric tree grants invulnerability in "Uncharted 2: Among Thieves"?`Sap
What new button is featured on the PS4's Dualshock 4 controllers?`SHARE
The PS4, along with Xbox One and Wii U, is a part of what generation of video game consoles?`8th`8`eight`eighth
Who is the main protagonist of "Call of Duty: Ghosts"?`Logan Walker
Who is the main antagonist of "Battlefield 4"?`Admiral Chang
Who is the main character of "GTA: San Andreas"?`CJ`Carl Johnson
In "GTA: San Andrea", what is CJ's brother's name?`Sweet
What popular PS3 game that spawned a sequel was narrated by Stephen Fry?`Little Big Planet
What Rockstar Game was the first to feature bullet time?`Max Payne
Who must Kratos kill in "God of War"?`Ares
Who is the main protagonist of "Final Fantasy X"?`Tidus
What was the last Mortal Kombat game for sixth generation consoles?`Armageddon
What game did Harmonix create when it lost the rights to the Guitar Hero franchise?`Rock Band
Who is Nathan Drake's estranged wife in the "Uncharted" series?`Elena Fisher
In the deathmatch mode of what game can you unlock William Shakespeare as a playable character?`Medal of Honor
In "Twisted Metal 2″, what does Krista Sparks drive?`Grasshopper
How many levels are there in the Tower of Orthanc in "Lord of the Rings: The Two Towers"?`20`twenty
What mode in "Gran Turismo" do you play to unlock new cars and tracks?`Simulation
What is the Helghast home planet in "Killzone: Shadowfall"?`Helghan
Who is the main character of "Battlefield 4″?`Daniel Recker
What new 4-player co-op mode is introduced in "Call of Duty: Ghosts"?`Extinction
In what survival horror game does Harry Mason search for his lost daughter?`Silent Hill
"Crash Bandicoot" is set on a trio of islands southeast of where?`Australia
Who published the game "1942" on the NES?`Capcom
"Donkey Kong 64" appeared on the Nintendo 64 in which year?`1999
Who is the owner of Lon Lon Ranch in the "Legend of Zelda" games?`Talon
In the "Banjo-Kazooie" games what type of animal in Banjo?`Honey Bear
Who kisses Mario on the nose at the end of "Super Mario 64"?`Princess Peach
In the earlier "Mario" games what is the character Princess Peach also known as?`Princess Toadstool
Which console did Nintendo release as their 3rd home console?`Nintendo 64
Pokemon first appeared on which Nintendo console?`Game Boy`Gameboy
Which Nintendo character is famous for being the first playable female hero in video game history?`Samus`Samus Aran
What was the name of "Castlevania" game released on the SNES?`Super Castlevania IV
What kind of game is "Dementium: The Ward" on the Nintendo DS?`Survival Horror
IN which game does Mario wear the Tanooki Suit which gives him the ability to fly?`Super Mario Bros 3
Which was the second title in the "Professor Layton" series on the Nintendo DS?`The Diabolical Box
In which game in the "Star Fox" series was the game character based rather than flight based?`Star Fox Adventures
Who is the main adversary in the Game Boy advance game "Zelda: The Minish Cap"?`Vaati`Vaati the Wind Mage
What is the companion release to "Pokemon Diamond" on the Nintendo DS?`Pearl
In the game "Paper Mario" what does the player have to collect for the main quest?`Star Spirits
What is the best selling game on the Nintendo Wii?`Wii Sports
In what year was popular video game "Halo 4" released?`2012
The first successful video game was "Pong", which was Atari's arcade version of what game?`Table Tennis
Name of the Mad Scientist who created deformed creatures in the video game Farcry?`Krieger
Who became the Real American Hero in the 1980s, when he battled COBRA?``G.I. joe`GI Joe
The Strong National Museum of Play has thousands of video games and it's in Rochester in what state?`New York
What does "RPG" stand for in the world of gaming?`Role Playing Game
In the original "Donkey Kong" arcade game, what was the ape's favorite weapon to use against Mario?`Barrel`Barrels
Final Fantasy VII was originally designed in what video game system?`Nintendo 64
What was the doomed console Apple released against the Nintendo 64, Sony PlayStation and Sega Saturn?`Apple Pippin
In what video game must a player maintain proper educational quotients, life expediencies, as well as pollution levels?`Sim City
What is the name of town in Diablo?`Tristram
In what country can the town of Silent Hill be found?`United States
Name the Atlantean admiral in the campaigns of the popular game Age of Mythology?`Arkontos
Name of the protagonist of the video game Half-Life?`Gordon`Gordon Freeman
The Half Life symbol is what Greek letter?`Lambda
In what video game must a player collect four rune keys to prevent Shun-Niggurath form destroying the world?`Quake
Who is the son of Durotan, an Orcish chiefain in the World of Warcraft?`Thrall
What PopCap game required you to swap adjacent gems to form chains of three or more?`Bejeweled
How much time does Link have to defeat Skull Kid in Majora's Mask?`3 days
The barrel roll from Star Fox 64 isnt actually a barrel roll but what?`Aileron roll
What was the first name of the game developing company Atari?`Syzygy
What year did Facebook debut?`2004
By what name was Netscape known officially before it became Netscape?`Mosaic
Founded by Paypal employees, what site was bought by Google for $1.65 billion?`YouTube
Pescadero, Oceano and Indio are codenames of earlier version of which popular software?`Firefox
Which American Vice President referred to the Internet as an "Information Super Highway"?`Al Gore
"Relationship Matter" is the slogan of which social networking site?`Linked In`Linkedin
What year was the Nintendo Game Boy released in the US?`1990
In what year was the compact disk invented?`1965
What was the "beta version" of the Internet called?`ARPAnet
How is binary digit more commonly known?`Bit
Which company published the famous first person shooter game 'Quake'?`id Software
Name the ebook develped by Barnes & Noble.`Nook
Who released the 2011 viral video 'Friday'?`Rebecca Black
Advertised briefly as the bloodiest video game in existence`mortal kombat
How many buttons (excluding the control pad) did the original NES controller have?`Four`4
How many fighters are playable in 'Street Fighter II'?`Eight`8
If you're killing a goomba, what game are you playing?`Super Mario Bros`Mario
In Chrono Trigger, who is the "Master of War?"`Spekkio
In 'Pac-Man' for the Atari 2600, how many points were each pellet worth?`One`1
In Sonic the Hedgehog, the character Knuckles is what species?`Echidna
In Super Mario Bros. 2, how many extra lives do you get for spinning three 7s on the slot machine?`Ten`10
In the game "Chrono Trigger," what is Lucca's mother's name?`Lara
In the game Joust, what animal was your mount?`Ostrich
In the original Contra, what gun would "S" get you?`Spread Gun
In the Sonic the Hedgehog series, what serves as your energy?`Rings`ring
Mega Man's traditional nemesis in the Mega Man series is whom?`Dr. Wily` Dr wily
Samus Aran is the femme-fatale of which series of games?`Metroid
The Hylians come from what game series?`The Legend of Zelda`legend of zelda`zelda
The Nintendo 64 was titled under what name during production?`Project Reality
The quote "You spoony bard!" is from what game?`Final Fantasy IV`Final Fantasy 4
What alternate dimension does Link find himself in in Majora's Mask?`Termina
What color is the 1-up mushroom in Super Mario Bros.?`Green
What does the acronym "NES" stand for?`Nintendo Entertainment System
What do you need to collect 100 of to get an extra life in Super Mario Bros.?`Coins
What is Mario's profession?`Plumber
What is the most powerful whip in 'Castlevania 2'?`Flame Whip
What is the name of the cloud-riding, glasses-wearing koopa in the Super Mario Bros. series?`Lakitu
What is the name of the Playstation controller that uses two analog joysticks?`Dual Shock
What is the name of the Star Fox Team's cocky wingman?`Falco Lombardi`Falco
What is your character's name in the 'Legend of Zelda' series?`Link
What member of the original StarFox team betrays the group to join StarWolf?`Pigma Dengar`Pigma
What number is the Pokemon "Scyther" in the Pokemon GameBoy games`123
What year was the first final fantasy created`1987
Which company made the original 'Donkey Kong'?`Nintendo
Which was the first console "Duke Nukem' game?`Duke Nukem 64
Who created the music for N2O: Nitrous Oxide?`The Crystal Method`Crystal Method
Who invented Tetris?`Alexey Pazhitnov`Alexey Pajitnov
Who is Mega Man's creator?`Dr. Light`Dr Light
Who is Mega Man's sister?`Roll
Who is the developer at Nintendo responsible for classics like Donkey Kong, Super Mario Bros., and The Legend of Zelda?`Shigeru Miyamoto
Who is the famed musical director for Square's Final Fantasy series?`Nobuo Uematsu
Who is the first gym leader you fight in 'Pokmon' for the Game Boy?`Brock
Who is the main character from Nintendo's 'Earthbound'?`Ness
Who is the main character in the 'DeathQuest' series?`Lucretzia
Who is the third opponent in 'Super Smash Brothers'?`Fox McCloud`Fox
Who was the main character in the original 'Street Fighter'?`Ryu
What's the first video game to become a television show`pacman
What series is the theme "green hill zone" from?`Sonic The Hedgehog`Sonic

335
data/trivia/general.txt Normal file
View File

@ -0,0 +1,335 @@
How long is a MLS soccer match?`90 Mins`90`90m`90 minutes
What was Sleeping Beauty's given name?`Aurora
"Neuro" means related to the what?`Brain
Luke, I am your ...?`Father
Who was the first person to do a 900 degree in skateboarding?`Tony Hawk
Which metal band has a mascot named "Eddie"?`Iron Maiden
Whose motto is 'We are a legion. We don't forgive. We don't forget'?`Anonymous
Whose painting is used on Woody Allen's 'Midnight in Paris' movie poster?`Van Gogh`Vincent van Gogh
Whose quote is "fly like a butterfly sting like a bee"?`Muhammad Ali
Who's the writer of 'Game of Thrones'?`George R.R. Martin`George R R Martin`GRRM
Whose album is ARTPOP?`Lady Gaga
Who's the singer and leader of Radiohead?`Thom Yorke
Who's the soccer player that has scored the most goals in the World Cups?`Klose
Who's the swimmer that has won 71 medals?`Michael Phelps
Who's the only person on The Simpsons that has 5 fingers?`God
Who's the father of modern electromagnetism?`Maxwell
Who's the main character in Grey's Anatomy?`Meredith
Whos is Peeta Mellark in love with?`Katniss Everdeen`Katniss
Whom is the famous phrase "I am your father" referred to?`Luke Skywalker
Who worked with Jackie Chan in Rush Hour 2?`Chris Tucker
Who won the FIFA World Cup of South Africa 2010?`Spain
Who won the FIFA World Cup in 2002?`Brazil
Who won the 2012 Champions League?`Chelsea
Who were the first users of papyrus?`Egyptians`Egyptian`Egypt
Who was the philosopher who said 'I only know that I know nothing'?`Socrates
Who was the only actor to win an Oscar afterhis death?`Heath Ledger
Who was the number 23 for the Chicago Bulls?`Michael Jordan
Who was the main actor in the movie Click?`Adam Sandler
Who was Sam's girlfriend in the movie Transformers 1 and 2?`Megan Fox
Who was JD's best friend in the TV series 'Scrubs'?`Turk
Who was Brad Pitt's partner in the 1995 film 'Se7en'?`Morgan Freeman
Who was Brad Pitt's first wife?`Jennifer Aniston
Who voiced Woody in the "Toy Story" trilogy?`Tom Hanks
Who sings the song "Love Story"?`Taylor Swift
Who stars in the movie "I am legend"?`Will Smith
Who says the famous salute "Live Long and Prosper"?`Spock
Who said "Time is a flat circle"?`Nietzsche
Who said that "objects which have no resultant force are either stationary or moving at constant velocity"?`Isaac Newton`Newton
Who released the album 'AM'?`Arctic Monkeys
Who plays the crazy person in the movie '12 Monkeys'?`Brad Pitt
Who is Thor's Father?`Odin
Who is the god of gods in Greek mythology?`Zeus
Who is the creator of characters like Spider Man and The Fantastic Four?`Stan Lee
Who is the creator of "Family Guy"?`Seth MacFarlane
Who is the "black sheep" in Family Guy?`Meg
Who is Superman' sweetheart?`Lois Lane
Who is SpongeBob SquarePants' best friend?`Patrick
Who is Spider-Man?`Peter Parker
Who is Mario's brother?`Luigi
Who is Bart Simpson's best friend?`Milhouse
Who is Bruce Wayne?`Batman
Who is Ned Stark's youngest daughter in the TV series 'Game of Thrones'?`Arya Stark`Arya
Who invented the telephone?`Bell
Who invented the world's first successful airplane?`Wright brothers
Who is the main character in "The Lion King"?`Simba
Who created Mickey Mouse?`Walt Disney
Who composed the music for the film 'Tron: Legacy'?`Daft Punk
"Bharathanatiyam" is the national dance of what country?`India
"Mr. Pink" is the alias of a character in which Quentin Tarantion film?`Reservoir Dogs
"Taipei" is the capital city of which country?`Taiwan
Adam Levine is the lead singer of which group?`Maroon 5
At what age did Mozart write his first opera?`Twelve`12
Bananas are rich in what?`Potassium
Complete the title of the Oscar-nominated film starring Tom Cruise, 'The Last ...'?`Samurai
Diamonds are an allotropic form of what element?`Carbon
Due to which element does acid become acidic?`Hydrogen
Edmonton is the capital of which province in Canada?`Alberta
Every how many years are the Winter Olympic Games celebrated?`Four`4
Fe is the symbol for?`Iron
Fraser Island belongs to what country?`Australia
Freddie Mercury was the singer of what band?`Queen
French Fries originate from which country?`Belgium
Heliophobia is the fear of?`Sunlight`The Sun`Sun
"15, 30, 40, game" is used for the scoring system of what sport?`Tennis
How is the speed of boats measured?`Knots
How many bytes are there in 1 kilobyte?`1024
How many cards are there in a deck?`52
How many chambers are there in the human heart?`Four`4
How many fingers does a simpsons character have?`Four`4
How many hearts does an octupus have?`Three`3
How many hours are there in a year?`8760
How many players are there in a cricket game?`Eleven`11
How many players are there in a Quidditch team?`Seven`7
How much is 2 raised to tenth power?`1024
How was Walter White known by the drug cartels in Breaking Bad?`Heisenberg
If you multiply the base by the height, and then divide by 2, you're calculating the area of what geometric figure?`Triangle
If you want to go Stockholm, what country are you in?`Sweden
In 'The Simpsons', what sort of animal is Itchy?`Mouse
In an e-mail, what does CC mean?`Carbon Copy
In Breaking Bad, what colour are Marie's appliances?`Purple
In chess, how many differents directions can the queen move if she is in one corner of the board?`Three`3
In computer science, what does the acronym LAN stand for?`Local Area Network
In Computer terms, what does CPU stand for?`Central Processing Unit
In Disney's Tangled, what was the name of Repunzel's animal side kick?`Pascal
In Divergent, what is the real name of the character named "Four"?`Tobias
In Doctor Who, how many hearts does the doctor have?`Two`2
In Doctor Who, what is the name of the Doctor's tin dog?`K9
In Greek mythology which monster is half goat, lion and snake?`Chimera
In Greek mythology, who was the god of the Underworld?`Hades
In tennis, what's the name of the point won directly with a serve?`Ace
How many rings on the Olympic flag`Five`5
What colour is Spock's blood`Green
Whose nose grew when he told a lie`Pinocchio
If you had pogonophobia what would you be afraid of`Beards
Which country grows the most fruit`China
Which company is owned by Bill Gates`Microsoft
Triskadeccaphobia is the fear of what`The Number 13`13`Thirteen`Number 13
Ictheologists study what`Fish
Who or what lives in a formicarium`Ants
Which part of the human body contains the most gold`Toenails`toenail
La Giaconda is better known as what`Mona Lisa
What is the largest state in the USA`Alaska
Clyde Tonbaugh discovered what planet in 1930`Pluto
In Japan what is Seppuku Hari Kari`suicide
What martial arts name means gentle way`Judo
In which country would you find the Negev desert`Israel
Which character has been played by the most actors`Sherlock Holmes
What element did Marie and Pierre Curie discover`Polonium & Radium`Polonium`Radium
What are Sarte, Neitzsche, Russell and Decartes`Philosophers`Philosopher
arry Allen was the alter ego of which DC comic superhero`The Flash`Flash
Linus Torwalds invented and wrote what`Linux kernel`Linux
What is the staple food of one third of the worlds population`Rice
Jagger, Richards, Wyman, Jones, Watts, Stewart - which band`The Rolling Stones`Rolling Stones
What digit does not exist in Roman Numerals`Zero`0
In Texas Hold'em, how many cards are dealt in 'The Flop'?`Three`3
In the British sci-fi show "Doctor Who", what's the name of the spaceship that can travel through space and time?`TARDIS
In the first Harry Potter film, what was the name of Neville Longbottom's pet toad?`Trevor
In The Simpsons, how many children does Apu have?`Eight`8
In the TV show "The Big Bang Theory", What is Sheldon's catch phrase?`Bazinga
In what country was Osama bin Laden found in 2011?`Pakistan
In what Disney movie could you listen to the song 'A Whole New World'?`Aladdin
In what field sport the winner is the player who has the lowest score?`Golf
In what movie does Arnold Schwarzenegger go to Mars?`Total Recall
In what state is Area 51 located?`Nevada
In what TV series did Steve Urkel appear?`Family Matters
In which direction does the sun set?`West
In which European city can you visit the Louvre Museum?`Paris
On "Sponge Bob Square Pants", what kind of animal is Sandy?`Squirrel
On the show "Spongebob Squarepants" Spongebob lives is which type of fruit?`Pineapple
To which organ of the body does the adjective adrenal relate?`Kidney
What is 26 in Roman numerals?`XXVI
What chemical element gives red wine its color?`Iron
What chess piece has the most freedom of movement?`Queen
What city does Batman protect?`Gotham
What color are Peter Pan's clothes?`Green
What color is a smurf?`Blue
What company makes the Radeon video cards?`AMD`ATI
What do the Olympic rings represent?`continents
What does BBC stand for?`British Broadcasting Company
What does E stand for in the formula E=mc2?`Energy
What day of the week does does Garfield hate?`Monday
What does RAM stand for?`Random Access Memory
What does the Q in Q-tip stand for?`Quality
What element has an atomic number of 69?`Thulium
What famous author was known for "The Iliad" and "The Odyssey"?`Homer
What hand is more valuable in poker?`Royal flush
What happens when a star explodes?`Supernova
What is a perfect game scoring in bowling?`300
What is Sherlock Holmes's brother called?`Mycroft
What is the chemical symbol for gold?`Au
What is the French word for Thank You?`Merci
What is the integral of cos(x)?`-sin(x)
What is the largest planet in the solar system?`Jupiter
What is the last name of the family in the TV series 'Family Guy'?`Griffin
What is the name given to a word or phrase that reads the same backward and forward?`Palindrome
What is the name of Iron Man's computer assistant?`Jarvis
What is the name of Mickey Mouse's dog?`Pluto
What is the name of our galaxy?`Milky Way
What is the name of restaurant where SpongeBob works?`The Krusty Krab`Krusty Krab
What is the name of Ron's sister in "Harry Potter"?`Ginny
What is the name of the actor who portrayed Jesse Pinkman on the TV series Breaking Bad?`Aaron Paul
What is the name of the battle where Napoleon was finally defeated?`Waterloo
What is the name of the cat in Stuart Little?`Snowy
What is the name of the cat that goes after Jerry?`Tom
What is the name of the component used to store energy in an electric field?`Capacitor
What is the name of the dog on Family Guy?`Brian
What is the name of the dwarf in Game of Thrones?`Tyrion
What is the name of the dynasty in China in 15th century?`Ming
What is the name of the giant bunny in "Donnie Darko"?`Frank
What is the name of the Greek goddess of wisdom?`Athena
What is the name of the lawyer in Breaking Bad?`Saul
What is the name of the main character in 'The Legend of Zelda'?`Link
What is the name of the Olympian goddess of love and beauty?`Aphrodite
What is the name of the water Greek God?`Poseidon
What is the number of the platform to take the Hogwarts Express?`9 3/4
What is the official language in Iran?`Farsi
What is the opposite colour of red?`Green
What is the planet in the solar system whose size is closest to that of the Earth?`Venus
What is the sum of the numbers 1 to 10?`55
What kind of tree gives acorns?`Oak
What organ processes the sodium in the body?`Kidney
What philosopher said the famous sentence 'I think, therefore I am'?`Descartes
What planet is the closest to the Sun?`Mercury
What planet was named after the God of War?`Mars
What Power Ranger was the leader (color)?`Red
What protocol is used by a router to assign dynamic IP addresses?`DHCP
What the binary number 1010 in decimal?`10
What scientist is famous for his three laws of physics?`Newton
What species was Chewbacca?`Wookie
What sport do you play if you are part of the NHL?`Hockey
What substance is injected to people with diabetes to reduce their hyperglycemia?`Insulin
What superhero was portrayed by Christian Bale?`Batman
What team of the NBA made Michael Jordan famous?`Chicago Bulls
What was Eminem's first album called?`Infinite
What was Muhammed Ali's real name?`Cassius Clay
What was Spock's race?`Vulcan
What was the first movie produced by Pixar?`Toy Story
What was the name of the ceremony where a Samurai would kill himself?`Seppuku
What's the abreviation of 'picture element'?`Pixel
What's the adjective used for the planes flying faster than the speed of sound?`Supersonic
What's the band that has won the most Grammy awards?`U2
What's the biggest mammal?`Whale
What's the chemical symbol of salt?`NaCl
What's the name of Snoopy's owner?`Charlie Brown
What's the name of Sponge Bob's best friend?`Patrick
What's the name of the bar tender in The Simpsons?`Moe
What's the name of the cup of the National Hockey League?`Stanley Cup`Stanley
What's the name of the dance step popularized by Michael Jackson?`Moonwalk
What's the name of the instrument used to measure atmospheric pressure?`Barometer
What's the name of the lead singer of the band Radiohead?`Thom Yorke
What's the name of the princess from Beauty`Belle
What's the name of the protagonist in the TV series "Breaking Bad"?`Walter White
What's the name of the traditional Japanese art of paper folding?`Origami
What are Ethan Kath and Alice Glass better known as?`Crystal Castles
What's the square root of 144?`12
Which is Canada's largest province?`Quebec
Which is the only bird that can fly backwards?`Hummingbird
Which is the only mammal in the world unable to burp?`Horse
Which of the original Spice Girls was the only one with a 'spice' nickname?`Geri Halliwell`Geri`Ginger
Which organ is responsible of producing insulin?`Pancreas
Which real city is taken by Gotham city in Batman movies?`Chicago
Which rock group is famous for the song "Stairway to Heaven"?`Led Zeppelin
Which sea is known by its high levels of salt?`Dead Sea
Which sports brand uses as its slogan the phrase "Just do it"?`Nike
Which state is known as the potato state?`Idaho
What did the Scarecrow want from the Wizard of Oz?`A brain`brain
What is Keanu Reeves character's Real name in "The Matrix" (1999)?`Thomas Anderson`Tom Anderson
What is the name of Han Solo's ship in "Star Wars"?`The Millennium Falcon`millennium falcon`millenium falcon
What kind of car was used as a time machine in the "Back To The Future" movies?`A DeLoren`deloren
What is the name of the sequel to "101 Dalmations"`102 Dalmations
What was Indiana Jones's real first name?`Henry
Who is famous for saying 'I'll be back'?`Arnold Schwarzenegger`Arnold
Who is famous for saying 'Make my day'?`Clint Eastwood`eastwood
In what movie did we first hear 'May the force be with you'?`Star Wars
How many tentacles does an octopus have?`Eight`8
How many legs does a spider have?`Eight`8
Where was the game of golf invented?`Scotland
What U.S. city is also called 'The Windy City'?`Chicago
What is the name of the bad guy in Peter Pan?`Captain Hook`Hook
What is the river named most often in the Bible?`Jordan
What is the Scottish word for lake?`Loch
Which planet is closest to the sun?`Mercury
How many moons does Mars have?`Two`2
Where were the 2000 Olympics held?`Sydney`Australia
What did Sir Galahad search for`The Holy Grail?`holy grail
What is the Spanish name for the South American capital which means 'good air'?`Buenos Aires
What is the capital of Hungary?`Budapest
What name is Paul Hewson better know as?`Bono
How many members in the guy group N'SYNC?`Five`5
Name a membera of N'SYNC whose name does NOT start with the letter "J".`Chris or Lance`Chris`Lance
What year was the movie Ben Hur with Charlton Heston made`1959
What is a Wyvern`A Type of dragon`Type of dragon`dragon
What year were PopTarts invented?`1964
What African country is only 8 miles from Spain?`Morocco
Which people created the sundial?`The Egyptians`Egyptians
Who did Paris, the ruler of Troy, select as the most beautiful goddess?`Aphrodite
What are Pyxis, Puppis, and Pavo?`constellations
How many deserts are in or extend into the United States?`Five`5
Name the 500,000 square mile desert that Mongolia and China share.`Gobi
What is the type of computer virus that is named after a device of trickery used in a famous mythological war?`Trojan Horse`trojan
When was the World Wide Web developed?`1990
In what Swiss city was the World Wide Web first developed?`Geneva
What color are the Majestic mountains in "America the Beautiful"?`Purple
Who made his debut in Action Comics No.1?`Superman
What color is the center stripe on the American flag?`Red
How many of the seven dwarf's names do not end with "y"?`Two`2
How many planets are between Earth and the sun?`Two`2
What country covers an entire continent?`Australia
Who was the first woman to win a Nobel Prize?`Marie Curie`Curie
Who wrote LES MISERABLES?`Victor Hugo`Hugo
Who wrote the novel NINETEEN EIGHTY-FOUR?`George Orwell`Orwell
How many stars are there on the Austrailian flag?`Six`6
In the sequence 2, 3, 5, 7, 11, 13, what number comes next?`Seventeen`17
What is the capital of Nova Scotia, Canada?`Halifax
Which country uses a Yen for money?`Japan
What country is the Aswan High Dam in?`Egypt
What did they use for croquet mallets in "Alice in Wonderland"?`Flamingoes`flamingos
What two gases are used in a welding torch?`Oxygen and Acetylene`oxygen`acetylene
What is the closest star to the Earth?`The sun`sun
What does a sphygmomanometer measure?`Blood pressure
When measuring acidity and alkalinity, what does "pH" stand for?`per hydroxide
Which poison smells like almonds?`Cyanide
What was Sherlock Holmes' brother's name?`Mycroft Holmes`Mycroft
Zeus created warriors called Myrmidons out of what creatures?`Ants`Ant
Vulcan blood is based on what metal?`Copper
What is the name given to the change in pitch accompanied by an approaching or receeding sound source?`Doppler Effect`Doppler
Which Roman god had two faces?`Janus
What was Dr. Who's phone booth called?`Tardis
Name Captain Nemo's submarine?`Nautilus
In what ancient city did Alexander the Great die?`Babylon
What does HDD stand for?`Hard Disk Drive
What does USB stand for?`Universal Serial Bus
What does WWW stand for?`World Wide Web
What does URL stand for?`Uniform Resource Locator
What was the name of the first wide-scale peer-to-peer music sharing application?`Napster
What company first invented the modern mouse?`Xerox
How many bits are in a byte?`eight`8
Solve for X: 5x+4=24`Four`4
How many sides does a 'icosohedron' have?`Twenty`20
What color reflects light from all parts of the visible spectrum?`white
How many states begin with the letter "A"?`Four`4
How many times did Dorothy click her heels together?`Tree`3
What color is Lisa's necklace on The Simpsons?`white
What color is a giraffe's tongue?`black
Curious George's friend was The Man in the what color hat?`yellow
What color blood does Mr. Spock have?`green
What nationality was Aladdin?`Chinese
What's the capital of the Netherlands?`Amsterdam
What Dr. Seuss character steals Christmas?`The Grinch`grinch
What's the primary color with the shortest name?`Red
What is the name for a male witch?`Warlock
What type of monster dies from a silver bullet?`Werewolf
What is the name of Harry Potter's owl?`Hedwig
Loch Ness is located in what country?`Scotland
How many stones did David carry into battle with Goliath?`Five`5
"I soiled my armor I was so scared!" is from which movie?`Monty Python and the Holy Grail`Holy Grail`Monty Python
"I've been dead once, already. It's very liberating." is from which movie?`Batman
What's the only country to have played in every World Cup soccer tournament?`Brazil
What's the common term for the layout of a computer keyboard?`QWERTY keyboard`qwerty
What city attracted Van Gogh and Toulouse-Lautrec to its bohemian Montmartre district?`Paris
What unit of sound intensity commemorates an inventor's last name?`Decibel
In blackjack, a hand of Ace and Nine can count as Ten or what?`Twenty`20
What's the official language of Brazil?`Portuguese
What does the koala eat exclusively?`Eucalyptus
What's the most abundant element on earth?`Oxygen

263
data/trivia/general2.txt Normal file
View File

@ -0,0 +1,263 @@
The Shatt-el-Arab (River of Arabia) is the confluence of which two other rivers? `TIGRIS and EUPHRATES`euphrates and tigris
Name the two families in Romeo and Juliet? `MONTAGUE & CAPULET`montague and capulet`capulet and montague`capulet&montague
Which singer joined Mel Gibson in the movie Mad Max: Beyond The Thunderdome?`TINA TURNER
Vodka, Galliano and orange juice are used to make which classic cocktail?`HARVEY WALLBANGER
Which American state is nearest to the former Soviet Union? `ALASKA
In which year did Foinavon win the Grand National? `1967
At which battle of 1314 did Robert The Bruce defeat the English forces? `BANNOCKBURN
Consecrated in 1962, where is the Cathedral Church of St Michael? `COVENTRY
On TV, who did the character Lurch work for? `ADDAMS FAMILY
Which children's classic book was written by Anna Sewell? `BLACK BEAUTY
How many tentacles does a squid have? `TEN
Which reggae singing star died 11th May 1981? `BOB MARLEY
Characters Charlie Allnut and Rosie Sayer appeared in which classic 1951 movie? `THE AFRICAN QUEEN
What is converted into alcohol during brewing? `SUGAR
Which river forms the eastern section of the border between England and Scotland? `TWEED
Which Briton won an ice-skating Gold at the Lake Placid Olympics? `ROBIN COUSINS
In what year was Prince Andrew born? `1960
What is the national game of the Basques? `PELOTA
TV commercials for Campari launched the career of which actress? `LORRAINE CHASE
If cats are feline, what are sheep? `OVINE
A red giant star typically evolves when its central hydrogen has converted to what gas?`Helium
In the song, Heartbreak Hotel is on which street? `LONELY STREET
What Greek mythological creature sprang from the blood of Medusa?`Pegasus
What type of animal is a macaque?`Monkey
Blue Monday, said to be the most depressing day of the year, falls during which month?`January
The majority of the Amazon Rainforest is contained within which country?`Brazil
How many definite suicides occur in the plays of William Shakespeare?`13`thirteen
Traditionally a coven traditionally refers to a meeting of how many witches?`13`thirteen
Bigarade sauce is traditionally made using which fruit?`Oranges`orange
Bras is French for which part of the body?`Arm`arms
In our solar system which is the 5th planet from the Sun?`Jupiter
Which letter is furthest to the right on a top letter row on a computer keyboard?`P
Bikram, Anusara, Kundalini and Iyengar are all types of which activity?`Yoga
What replaced the iron in the board game Monopoly?`Cat
People born on April 17th have which sign of the Zodiac?`Aries
Hinge, Saddle, Pivot and Gliding are all types of what in the human body?`Joint`joints
Gimpo International Airport is located in which Asian city?`Seoul
Siderodromophobia is the irrational fear of which mode of transport?`Trains`train
What was S Vietnams Ho Chi Minh City called before 1976?`Saigon
A titi is what type of animal?`Monkey
To what colour is the human eye most sensitive?`Green
Gabel is German for which item of cutlery?`Fork
In nature, Greco, Ostro, Libeccio and Sirocco are all types of what?`Winds`wind
What was disestablished as the state religion of Japan after WWII?`Shinto
What chemical element (Cu) is named after Cyprus?`Copper
Suva is the capital of which South Pacific island?`Fiji
James Augustus Hickey founded the first printed what in India in 1780?`Newspaper
Hombro is Spanish for which part of the body?`Shoulder
Lake Mamry and Lake Drawsko are in which European country?`Poland
What type of flesh does a pescatarian eat?`Fish
Which animal represents the deadly sin of envy?`Snake
Which Asian country is known as the Land of Smiles?`Thailand
Lonicera is the Latin name for which garden plant?`Honeysuckle
Sitophilia is the use of what for sexual arousal?`Food
Which is the only planet in our solar system to have water in three states of matter: solid, liquid and gas?`Earth
Which country is bordered by the Gaza Strip, Israel, Libya and Sudan?`Egypt
What type of creature is a cichlid?`Fish
People born on the 1st March have which sign of the Zodiac?`Pisces
Gorgonzola cheese is from which country?`Italy
Dydd Sadwrn is Welsh for which day of the week?`Saturday
What is the title of the 2001 film in which Russell Crowe plays mathematician John Nash?`A Beautiful Mind
In April 1966, Bobbi Gibb became the first woman to run the entire distance of which marathon?`boston`Boston Marathon
For his part in which 1953 film did Frank Sinatra receive a Best Supporting Actor Oscar? `FROM HERE TO ETERNITY
For which fruit is the US state of Georgia famous? `PEACH
Which is the financial centre and main city of Switzerland? `ZURICH
Who is the only man (at 2009) to have won motorbike and F1 car World Championships? `JOHN SURTEES
In which city was Martin Luther King assassinated in 1968? `MEMPHIS, TENNESSEE`memphis
In which county is the UK prime minister's official country residence Chequers? `BUCKINGHAMSHIRE
What is the word used to describe an animal/plant that is both male and female? `HERMAPHRODITE
In which country did the Mau Mau uprising (1952-60) occur? `KENYA
What does a numismatist study or collect? `COINS
Who captained Jules Verne's submarine Nautilus? `CAPTAIN NEMO`nemo
The llama belongs to the family of animals commonly called what? `CAMELS
In which 1979 film was the spaceship called Nostromo? `ALIEN
The Sheffield Shield is competed for in which sport? `CRICKET
What is infant whale commonly called? `CALF
How many gallons of beer are in a firkin? `NINE`9
Alan Minter was undisputed World boxing champion at which weight? `MIDDLEWEIGHT`middle weight
Which Latin term, usually applied to legal evidence, means 'at first sight'? `PRIMA FACIE
What is the alternative common name for a Black Leopard? `PANTHER
In which bay is Alcatraz? `SAN FRANCISCO BAY`san francisco
In which Dickens novel was Miss Havisham jilted on her wedding day? `GREAT EXPECTATIONS
What is an otter's home called? `HOLT
Who had a 1985 hit with Saving All My Love For You? `WHITNEY HOUSTON
In Roman mythology, Neptune is the equivalent to which Greek god? `POSEIDON
What is the only English language single word anagram of the word crouton? `CONTOUR
Which TV character said, 'Live long and prosper'? `MR SPOCK`mr.spock`spock
What is the other name for Wildebeest? `GNU
What make of car was the time-machine in the film Back To The Future? `DE LOREAN
In which State would you find the city of Birmingham? `ALABAMA
Complete the name of the American Football team: 'Washington ...........'? `REDSKINS
How old is a horse when it changes from a filly to a mare? `FOUR YEARS`4 years
Robin Hood & Friar Tuck appear in which well-known novel, by Sir Walter Scott? `IVANHOE
What is Canada's national animal? `BEAVER
Which is the smallest member of the flute family? `PICCOLO
Which Bond villain has been played by Telly Savalas, Donald Pleasance, Charles Gray, and Max Von Sydow? `BLOFELD
'Mace is one of the spices obtained from the tree Myristica Fragrams - what is the other? `NUTMEG
What is the colour of the bull of an archery target? `GOLD
UNHCR is the United Nation's High Commission for what? `REFUGEES
A palmiped's feet are more commonly called what? `WEBBED
Which animal is known as 'The Ship of the Desert'?`Camel
How many red stripes are on the American national flag?`Seven
In the children's television show, what is the name of the yellow Teletubby?`Laa-Laa`laa laa
British athlete Duncan Goodhew is associated with which sport?`Swimming
What colour rose is the title of a Thin Lizzy song?`Black
English wrestler Shirley Crabtree Jr was better known by what name?`Big Daddy
What is the name of the monster's creator in the 1818 novel of the same name by Mary Shelley?`Frankenstein`Victor
How many seconds in an hour?`3600`Three thousand six hundred
The Trafford Shopping Centre is in which English city?`Manchester
Actress Gwyneth Paltrow named her first child after which fruit?`Apple
Which is the largest state in the US?`Alaska
What is the least number of games that have to be played to win a set in a tennis match?`Six`6
What is the name of the blood-sucking worm sometimes used by doctors?`Leech
Which country has the most time zones?`Russia
Fictional characters Clark Kent, Lois Lane and Jimmy Olsen work for which newspaper?`The Daily Planet
Which is the most powerful chess piece?`Queen
What is the name of Batman's sidekick and ward?`Robin
In which ocean is Tahiti?`Pacific Ocean`Pacific
What color is the 'Little Corvette' in the 1983 single by Prince?`Red
The port of Dover is in which English county?`Kent
During which month of the year is Hogmanay celebrated?`December
Sir Christopher Wren designed which famous London cathedral?`St Pauls`St. Paul`St paul`st. paul's
How is the number ten written in Roman numerals?`x
Which sign of the Zodiac is represented by the fish?`Pisces
What is 255 divided by 5?`51`fifty one
Which fictional character uses the expression 'Eat my shorts'?`Bart Simpson
In Greek mythology who is the messenger god?`Hermes
How high is the crossbar of a FIFA rules football goal in feet?`Eight`8`8 feet`eight feet
What is the capital of Hungary?`Budapest
How many letters are on the bottom letters row of a QWERTY keyboard?`Seven`7
Which US city is known as The Windy City?`Chicago
Which sport features line-outs, scrums and conversions?`Rugby
Which spice is known as the 'Master Spice'?`Pepper
Which 2009 animated film features a floating house suspended by helium balloons?`Up
The Golden Gate bridge is in which US city?`San Francisco
The Great Pyramid is in which country?`Egypt
Who was the father of English monarch Elizabeth I?`Henry VIII`King Henry VIII
Which fictional superhero goes by the name of Bruce Wayne?`Batman
There are how many in a gross?`144
Which fruit from Seville in Spain is usually used to make marmalade?`Orange
Singer Beyonce Knowles married which rapper in 2008?`Jay-Z
Who played Captain Jack Sparrow in the 'Pirates of the Caribbean' series of films?`Johnny Depp
What is the 'lead' in pencils made from?`Graphite`carbon
How many ounces in an Imperial pound?`16`sixteen
Pug, Boxer and Chow are all breeds of which animal?`Dog
Which body of water connects England and France?`The English Channel
What is the most common element in the Universe?`Hydrogen
What is the system of raised dots called which blind people use to read with their fingers?`Braille
How many vowels are in the English alphabet?`5`Five
Oil of Cloves is traditionally used to treat the pain in which part of the human body?`Teeth`tooth
What color 'Haze' is the title of a 1967 hit by Jimi Hendrix?`Purple
What is the capital of France?`Paris
Who is the voice of Princess Fiona in the Shrek series of films?`Cameron Diaz
'What's up Doc' is the catchphrase of which cartoon character?`Bugs bunny
Which US singer is known by the nickname J Lo?`Jennifer Lopez
On which fictional planet was Superman born?`Krypton
Who wrote the novel 'The Adventures of Huckleberry Finn'?`Mark Twain
How many planets are there in our solar system?`8`Eight
Which nuts are traditionally used to make pesto sauce?`pine`Pine nuts
How many holes are there, usually, in a ten-pin bowling ball?`3`Three
The Sherlock Holmes Hotel is in which London street?`Baker Street`Baker
What colour, traditionally, are cabs in New York?`Yellow
What is the square root of 81?`9`nine
How many inches in five feet?`60`sixty
Courgette is another name for which vegetable?`Zucchini
What is a group of lions called?`A pride`pride
What does ET stand for in the 1982 Steven Spielberg film?`Extra Terrestrial`extraterrestrial
Who was the first female Prime Minister of the UK?`Margaret Thatcher
Isabella 'Bella' Swan is the lead character in which series of vampire books?`Twilight
In Greek mythology, who was the ruler of the Olympian gods?`Zeus
How many US Presidents faces are carved into Mount Rushmore?`4`Four
How many events make up a Triathlon?`3`Three
The terms Silver, Forked and Twister are all associated with which part of the body?`Tongue
What is the name of a small, ground-dwelling songbird and something done for fun?`Lark
Convict Magwitch appears in which novel by Charles Dickens?`Great Expectations
What is 1500 in Roman numerals?`MD
What is the national bird of New Zealand?`Kiwi
What value points is the black ball in the game of snooker?`7`Seven
How many bails are part of a wicket in a game of cricket?`2`Two
Which substance makes bread rise?`Yeast
Miel is French for which foodstuff?`Honey
What colour is The Old Kent Road on a Monopoly board?`Brown
How many seconds are there in an hour?`3600
Pavane, Polonaise and Polka are all types of what activity?`Dance
Which fictional superhero is known as 'The Man of Steel'?`Superman
Peter Parker is the alter-ego of which fictional superhero?`Spiderman
What is the name of the branch of biology that studies plants?`Botany
What are the native people of Australia called? `aborigine`Aborigines
Which US city did Scott McKenzie sing about in 1967?`San Francisco
Who is the Roman god of the sea?`Neptune
Which domestic animal was worshipped by the ancient Egyptians?`cat
What value points is the brown ball in a game of snooker?`Four
What is the name of a long-bodied marine fish and a person who unscrupulously exploits or swindles others?`Shark
What is the national animal of Finland?`Brown bear
How many squares are on a chess board?`64`sixtyfour`sixty-four
In the human body, molars, canines and incisors are all what?`Teeth`tooth
How many events make up a biathlon?`2`Two
What is a line called that goes straight from the center of a circle to the circumference?`Radius
Mount Etna is on which European island?`Sicily
The cup, or bowl, Jesus was said to have used at the Last Supper is known as 'The Holy ...'?`Grail
How many wings does a bee have?`4`Four
The musical "West Side Story" is based on which Shakespeare play?`Romeo and Juliet
Whose 1988 autobiography is entitled 'Moonwalk'?`Michael Jackson
How many dice are used in a standard game of 'Craps'?`2`Two
What is the boiling point of water in degrees Farenheit?`212`two hundred and twelve
What is the first name of Bill and Hillary Clintons daughter?`Chelsea
What is the cube root of 27?`3`three
How many days are there in the month of August?`31`thirtyone`thirty-one
What is the name of the fairy in the play Peter Pan by J M Barrie?`Tinker Bell
What type of drink is claret?`Wine
How many compartments does a cow's stomach have?`4`Four
In humans, what is the name of the front cutting teeth?`Incisor`Incisors
What is the longest river in North America?`Missouri River`Missouri
What is the name of the daughter of cartoon character Fred Flintstone?`Pebbles
What is the highest prime number between 1 and 100?`97`ninetyseven`ninety-seven
How many grams in half a kilo?`500`five hundred
What colour is the skin of a courgette?`Green
Gotham City is associated with which fictional superhero?`Batman
What breed of dog is known as a 'Sausage dog'?`Dachshund
Thomas the Tank Engine lives on which fictional island?`Sodor
What is the capital of Sweden?`Stockholm
During which month of the year are the US Presidential elections held?`November
What is the name of a Telly Tubby and an Italian river?`Po
What was the most common password used online in 2012?`Password
What colour shirts did the Italian Fascists wear under the leadership of Benito Mussolini?`Black
Pepe le Pew is what type of cartoon animal?`Skunk
Which US city was named after St Francis of Assisi?`San Francisco
Which bird lays the largest eggs?`Ostrich
In the game of Clue, what colour is the piece that represents Mrs Peacock?`Blue
How many points are scored for a dropped goal in rugby union?`3`Three
What is the largest gulf in the world?`Gulf of Mexico`the gulf of mexico
Melbourne is the capital of which Australian state?`Victoria
How many squares are on a Spear's Games Snakes and Ladders board?`100`one hundred
How many Deadly Sins are there?`7`Seven
How many Jokers are in a standard pack of cards?`2`Two
Prince Albert, husband of British monarch Queen Victoria, was born in which modern-day country?`Germany
Which animal is depicted as the face of breakfast cereal Coco Pops?`Monkey
The countries Ghana, Nigeria and Kenya are all in which continent?`Africa
What is the square root of 144?`12`twelve
What colour is superhero Batman's Batphone?`Red
'The Grand Ole Opry' in America is famous for what type of music?`Country music`Country
The caber, kilts and bagpipes are all associated with with European country?`Scotland
How many cards are in each suit in a standard deck of cards?`13
Ancient Egyptian Cleopatra was said to have been killed by what type of snake?`Asp
How many events make up a pentathlon?`5`Five
What is the boiling point of water in degrees Celsius?`100
Which is the only bird in the Chinese Zodiac?`Rooster
What is the cube root of 1,000?`10
Which legendary English outlaw 'stole from the rich to give to the poor'?`Robin Hood
Who played Han Solo in the 'Star Wars' series of films?`Harrison Ford
Who sang at half time at the US Super Bowl in February 2013?`Beyonce
In July 2013, who revealed that they were the secret author Robert Galbraith?`J K Rowling`j.k. rowling'j. k. rowling
How many apostles are there in the painting 'The Last Supper' by Leonardo da Vinci?`12`twelve
Not including the cellar, how many rooms are there in the board game Clue?`Nine`9
What is the capital of Canada?`Ottawa
What colour is Teletubby Po in the children's television series Teletubbies?`Red
In the Harry Potter series of books, what animal does Sirius Black turn into?`Dog
The element hydrogen has which number on the Periodic Table?`1
Which famous artist spent four years painting the ceiling of the Sistine Chapel in Rome?`Michelangelo
How many time zones does Russia have?`9`Nine
In British legend, what is the name of King Arthur's sword?`Excalibur
What was the first team sport included in the Olympic Games?`Soccer`football
The White Rose Shopping Centre is in which English city?`Leeds

219
data/trivia/harrypotter.txt Normal file
View File

@ -0,0 +1,219 @@
What is the name of the driver of the Knight Bus?`Ernie Prang
In which month of the year is Harry Potter's birthday?`July
What is the Hogwarts School motto in English?`Never Tickle a Sleeping Dragon
In the Harry Potter, who killed Cedric Diggory in the Goblet of Fire?`Peter Pettigrew
Which late actor played Albus Dumbledore in the first two Harry potter films?`Richard Harris
Which animal is Hagrid allergic to?`Cats
What is the name of the wizarding pub in London in the Harry Potter novels?`The Leaky Cauldron
What make and model is the Weasley familys flying car?`Ford Anglia
What is the name of Harry Potters pet owl?`Hedwig
The Hogwarts Express leaves which London station?`Kings Cross
To get into the Ministry of Magic via the visitors entrance, what number must be dialed?`62442`MAGIC
What is the name of the actor who plays Harry Potter in all the films?`Daniel Radcliffe
What is the title of the third Harry Potter book?`The Prisoner of Azkaban
What does N.E.W.T stand for in examinations at Hogwarts School? `Nastily Exhausting Wizarding Test
What is the name of the team sport, played by seven players on each team?`Quidditch
Which animal is James Potter's 'Patronus'?`stag`A stag
What is the name of the Charms Master at Hogwarts School?`Filius Flitwick`flitwick`professor flitwick
Who destroyed the last remaining Horcrux?`neville`neville longbottom
What do Ron and Hermione use to destroy Helga Hufflepuff's cup?`basilisk fang
When Harry attended his hearing at the Ministry of Magic, what colour paper aeroplanes flew into the lift at Level Four?`pale violet`violet
How many Chocolate Frog cards does Ron estimate he has in Harry Potter and the Philosopher's Stone?`500`five hundred
In the epilogue of Harry Potter and the Deathly Hallows, what job does Harry have?`auror
What is the only antidote to Basilisk venom?`phoenix tears
What is the symbol for Gryffindor house?`lion`a lion
In Harry Potter and the Philosopher's Stone which Gringotts vault was the Philosopher's Stone kept in?`713`seven hundred and thirteen
What is the symbol for Hufflepuff house?`badger`a badger
What creatures feed on positive human emotions?`dementors`dementor
What was Tom Riddle's mother's maiden name?`Gaunt
How many points is the Golden Snitch worth?`150`one hundred and fifty
What secret name do Harry, Ron and Hermione use to refer to Sirius Black?`snuffles
What month is Ron's birthday?`March
Which of Ron's brothers is a Gryffindor Prefect in Harry's first year?`Percy`Percy Weasley
How many Sickles are in a Galleon?`17`seventeen
In Harry Potter and the Prisoner of Azkaban, who orders a cherry syrup and soda with ice and umbrella from the Three Broomsticks?`Professor Flitwick`Flitwick`Filius Flitwick
Who tells Harry and Ron that people can be a 'bit stupid' about their pets?`hagrid
What is the name of Dumbledore's phoenix?`fawkes
What is the symbol for Slytherin house?`snake`a snake
Who is unanimously elected leader of Dumbledore's Army?`harry potter`harry
What does Professor Lupin give Harry to eat after his encounter with a Dementor?`chocolate
How many goal posts are there on a Quidditch pitch?`six`6
How many brothers does Ron have?`5`five
What creatures does Charlie Weasley work with in Romania?`dragons`dragon
What does O.W.L. stand for?`Ordinary Wizarding Level
What patronus does Luna Lovegood have?`rabbit
What was Harry's first broomstick?`nimbus 2000
What was the name of the female elf Dobby liked?`winky
What is Harry's youngest son's name?`albus
What is the symbol for Ravenclaw house?`eagle`an eagle
What was James Potter's school nickname?`Prongs
What is the proper name for the potion "Liquid Luck"?`Felix Felicis
What is Tonks's first name?`Nymphadora
What kind of creature is Buckbeak?`hippogriff
Who did Harry take to the Yule Ball?`parvati patil
What is the form of Hermione's patronus?`otter
Who is Voldemort's servant?`peter pettigrew`pettigrew
Why did the Ministry stop using owls for interroffice memos?`droppings`owl droppings`the droppings
How many muggles see the flying car in Harry Potter and the Chamber of Secrets on Ron and Harry's way to Hogwarts?`7`seven
What is Luna Lovegood's fathers name?`Xenophilius Lovegood`xenophilius
Which of the Hogwarts founders created the Chamber of Secrets?`salazar slytherin`slytherin
What Animagus form is taken by Sirius Black?`dog
Which spell is used to unlock doors?`alohomora
What color were the flames that came out of the Goblet of Fire?`blue
On which O.W.L. exam did Harry Potter get his worst score?`history of magic
How many players are on a Quidditch pitch at one time in a match?`14`fourteen
What is the name of the bookstore where students buy their books?`Florish and Blotts
Who wrote "A History of magic"?`Bathilda Bagshot
What is the name for the Hogwarts lake?`Black Lake`the black lake
Who was Harry's first crush?`Cho Chang
Who gave Harry his first broom?`Professor McGonagall`McGonagall`minerva mcgonagall
What do Hermiones parents do for a living?`dentists`dentist
What is the name of Hermione's cat?`Crookshanks
Who does ginny go to the yule ball with?`Neville Longbottom`Neville
What is Professor Mcgonagall's transfiguraton form?`cat`a cat
What is the name of the dragon that Hagrid had?`Norbert
Who killed Bellatrix Lestrange?`Molly Weasley
What is voldemort's real full name?`Tom Marvalo Riddle
What are draco's parents' names?`Lucious and Narcissa`Narcissa and Lucious
Who is the headmaster of Durmstrang?`Igor Karkaroff`Karkaroff
Which arm is the dark mark on?`left
Which spell can levitate objects?`Wingardium Leviosa
Where does Hagrid take Harry to buy his school supplies?`Diagon Alley
What position does Harry play in Quidditch?`seeker
What subject does Professor McGonagall teach?`Transfiguration
Who is caretaker of Hogwarts?`Filch`argus filch
What is the name of Filch's cat?`Mrs. Norris
What is the name of the three-headed dog?`Fluffy
What gift does Hagrid give Harry in Diagon Alley?`hedwig`an owl`owl
A bezoar is a stone taken from the stomach of a ...?`goat
How many Horcruxes of Voldemort's are there?`7`seven
How many Unforgivable curses are there?`3`three
Who does Hermione go to the Yule Ball with in Harry Potter and the Goblet of Fire?`viktor krum`krum
Who kills Dumbledore?`snape`severus snape
Who became Seeker when Harry was banned from quidditch?`Ginny Weasley`Ginny
What color are unicorn foals?`pale gold`gold
Who has a famous acid-green Quik-Quotes Quill? `rita skeeter
What is the name of the vicious tree that Harry and Ron drove into in 'Harry Potter and the Chamber of Secrets'?`The Whomping Willow
Who was the Whomping Willow planted for?`remus lupin`lupin
Who has famous Rock Cakes? Hagrid
What is Hermione's middle name?`jean
How much was Dobby paid a month in the Hogwarts kitchen?`one galleon`1 galleon
What is Dumbledore's sister's name?`ariana
What did Dumbledore leave in his will for Ron?`deluminator
According to 'The Life and Lies of Albus Dumbledore', What was Doge's nickname?`dogbreath
What fruit must you tickle to get into the Hogwarts kitchen?`pear
Fill in the blank: "Holy _________, you're Harry Potter!!" - Hermione Granger?`cricket
What book does Hermione insist Ron and Harry read?`Hogwarts, A History
Who said it: 'We did it, we bashed them!"?`Peeves
Into how many pieces did Ron tear Percy's letter of congratulations on becoming a prefect before throwing it into the fire?`8`eight
Who is it: Deputy Headmisstress of Hogwarts?`professor mcgonagall`mcgonagall`minerva mcgonagall
Who is the 5th year Defense aganst the Dark Arts teacher?`Dolores Umbridge`professor umbridge
Who is also known as Padfoot?`sirius black
Who was a werewolf also known as mooney?`remus lupin
Who was nicknamed Wormtail, but Ron knew him as Scabbers?`peter pettigrew
Who was an animagus known as Prongs?`james potter
Who was petrified in book 2 and died in book 7?`colin creevey
What was the name of the charming young witch who was friends with Snape?`lily evans
Who is it: Keeper of Keys and Grounds at Hogwarts?`Hagrid
What is the name of the School of Witchcraft that Fleur Delacour attended?`Beauxbatons
What is the name of the school Victor Krum attended?`durmstrang
What is the name of the school that all witches and wizards attended in Britan?`hogwarts
What is the name of the place filled with witches and wizards and (if you can't apparate or haven't got any floo powder handy) can only be entered through the Leaky Cauldron?`Diagon Alley
What is the name of Voldemort's prized snake?`nagini
Who is Harry's cousin?`Dudley Dursley
What is the name of Harry's aunt?`petunia dursley
What is the name of Harry's uncle?`vernon dursley
Who is the Head of Hufflepuff?`professor sprout`sprout
Who is the Head of Ravenclaw?`Professor Flitwick`flitwick`filius flitwick
Who is the poltergist at Hogwarts?`peeves
What is the name of the twin that dies in the last book?`fred weasley`fred
What is the name of the twin that loses his ear in the last book?`george weasley`george
What is the name of the Weasley that (from book four until his apology in book seven) follows the ministry like a prat?`Percy weasley`percy
What is the name of the Weasley that works with dragons?`charlie weasley`charlie
What is the name of Ron's brother who works for Gringotts?`bill weasley`bill
What is the name of Ron's father?`arthur`Arthur Weasley
What is the name of the wizards prison?`azkaban
What is the name of the house that Luna Lovegood is in?`ravenclaw
What is the name for the house for people who didn't fit in any of the other houses?`hufflepuff
What house did the Sorting Hat suggest to Harry?`slytherin
What did Katie Bell touch that put her in Saint Mungos in year 6?`opal necklace
What is the last name of the three brothers who origanally owned the Deathly Hallows?`peverell
What is the name of the goons that follow Malfoy around as bodygaurds?`crabbe and goyle`goyle and crabbe
What is the term used for bodies bewitched to do as a Dark wizard bids?`inferi
What is the name of the landlord of the Leaky Cauldrons?`tom
What is the name of Draco's son?`scorpius
What is Mr. Malfoy's first name?`lucius
What did Hermione squeeze in Fred and George's room that punched her?`telescope
What was the name of Hagrid's half-giant brother?`grawp
What is the name of the sweet that makes you spew?`puking pastils
What did Lavender Brown call Ron?`won-won`won won
Who did Ron suddenly have an infatuation for, after accidentally eating some love potion meant for Harry?`romilda vane
Hermione Granger Who in the 3rd year class wrote an essay on werewolves?`hermione`hermione granger
What is the name of the werewolf who bit Lupin?`fenrir greyback
What is the theme of the tapestry near the Room of Requirement?`trolls
What breed was Hagrid's pet dragon? `Norwegian Ridgeback
Who is the only one Peeves is afraid of?`The Bloody Baron
What animal's tail hair is the elder wand made of?`Thestral
What is the incantation that makes the dark mark appear?`Morsmorde
What is Cho Chang's Patronus?`swan
How many students are picked to become prefects from each house's fifth year house?`2`two
What is the age requirement for an Apparation License?`17
Who is the Hufflepuff ghost?`The Fat Friar
What is Padma Patil's Boggart?`cobra
What is the name of Neville's grandmother?`augusta`augusta longbottom
Where is the Hufflepuff common room?`kitchen
Where was the Voldemort's horcrux ring hidden?`Gaunt Shack
What page does Snape tell Harry's Defense Against the Dark Arts Class to turn to?`394
Who does Hermione try to turn into when using the Polyjuice Potion?`Pansy Parkinson
What did Dumbledore teach before he was Headmaster?`Transfiguration
In what country is Voldemort said to be hiding in from books 2-4?`Albania
In the movies Neville gives Harry Gillyweed before the Second Task. However, who gives it to him in the books?`Dobby
What color bubbles does Professor Flitwick make for Christmas in the first book?`Gold
What color is Tonks's hair when Harry first meets her? `purple
What is Buckbeak's alias?`Witherwings
What does the sign on Weasley's Wizard Wheezes say?`You-Know-Poo
What is the core of Cedric's wand?`Unicorn tail hair
Which unforgivable curse causes pain to the victim?`Crucio
Who is the Blacks' house elf?`Kreacher
Who gave Hermoine her Time-Turner?`minerva mcgonagall`mcgonagall`professor mcgonagall
Which shop sells candy?`honeydukes
Who killed Alastor Moody?`voldemort`lord voldemort
Which unforgivable curse kills the victim?`Avada Kedavra
What flavor of ice cream does Hagrid buy Harry?`chocolate and raspberry`raspberry and chocolate
What form does the boggart take in the presence of Seamus Finnigan?`banshee
Which Quidditch team does Cho Chang support?`Tutshill Tornadoes
Who bows to Harry before he knows that he is a wizard?`Dedalus Diggle
What creature is hatched by putting a toad over a chicken's egg?`basilisk
Which type of dragon did Fleur Delacour have to face in the first atsk of the Tri-Wizard Tournament?`Common Welsh Green
Which one of the following subjects does Professor Vector teach?`arithmancy
What is Dumbeldore's patronus?`phoenix
What is considered Harry's 'trademark spell'?`Expelliarmus.
What is the core of Krum's wand?`dragon heartstring
Who was Dumbledore's predecessor as headmaster at Hogwarts?`Armando Dippet
What is Rowena Ravenclaw's aughter's name?`Helena
Many of the recipes used at Hogwarts are those of ___?`Helga Hufflepuff`hufflepuff
What house was Tonks in?`Hufflepuff
Which house was Umbridge in?`Ravenclaw
Educational Decree No. 30 declared that what wasn't allowed in the corridors?`Music
The Fat Friar was the Ghost of which house?`Hufflepuff
Who became the head of Slytherin house in the seventh book after Snape ran away (in the sixth book)? `Horace Slughorn`professor slughorn`slughorn
Who was the only death eater that was sorted into Gryffindor?`Peter Pettigrew`pettigrew
Who put Harry's name in the Goblet of Fire?`Barty Crouch Jr`barty crouch jr.
Who found Harry under his cloak on the train in Half Blood Prince?`Tonks
What creature is known to become violent when insulted?`hippogriff
What creature stopped Fleur from finishing the second challenge in the tri-wizard tournament?`Grindylows
What is the incantation for the spell that stuns people?`Stupefy
What spell removes your memory?`Obliviate
What is Ron Weasley's middle name?`Billius
From who does Hagrid borrow the flying motorbike he uses to deliver Harry to the Dursleys?`Sirius Black
How does one put Fluffy to sleep?`music
A wizard who can transform himself into an animal at will is called what?`animagus
The Slytherin common room is located where?`dungeons`the dungeons
Whose patronus is a goat?`Aberforth Dumbledore`aberforth
Sirius Black sends Harry what type of broom?`Firebolt
Hermione hides what artifact through most of the 3rd book/film?`Time turner
What is Severus Snape's mother's first name?`eileen
What magical plant does Harry use to breathe underwater in the 4th book?`gillyweed
What kind of ice cream treat did Harry Get at the zoo in the 1st book?`lemon ice pop
What was the name of the owl Percy got for becoming a prefect?`errol
How much Veela does Fleur DeLacour have in her?`1/4`quarter

127
data/trivia/leagueults.txt Normal file
View File

@ -0,0 +1,127 @@
Which champions ultimate is named: Spirit Rush?`Ahri
Which champions ultimate is named: Hemoplague?`Vladimir`vlad
Which champions ultimate is named: On The Hunt?`Sivir
Which champions ultimate is named: Destiny?`Twisted Fate
Which champions ultimate is named: UPGRADE!!!`Heimerdinger`donger`heimer
Which champions ultimate is named: Enchanted Crystal Arrow?`Ashe
Which champions ultimate is named: Mantra?`Karma
Which champions ultimate is named: Keeper's Verdict?`Poppy`poopy
Which champions ultimate is named: Glacial Storm?`Anivia
Which champions ultimate is named: Rite of the Arcane?`Xerath
Which champions ultimate is named: Bullet Time?`Miss Fortune
Which champions ultimate is named: Tempered Fate?`Bard
Which champions ultimate is named: Void Assault?`Kha'zix`roach`cockroach
Which champions ultimate is named: Fury of the Sands?`Nasus`snap dag
Which champions ultimate is named: Shadow Assault?`Talon
Which champions ultimate is named: Crowstorm?`Fiddlesticks`fiddle
Which champions ultimate is named: Thunder Claws?`Volibear`Voli
Which champions ultimate is named: Behind Enemy Lines?`Quinn
Which champions ultimate is named: Cyclone?`Wukong`wu
Which champions ultimate is named: Infinite Duress?`Warwick`ww
Which champions ultimate is named: Glacial Prison?`Sejuani`sej
Which champions ultimate is named: Spider Form/Human Form?`Elise
Which champions ultimate is named: Requiem?`Karthus
Which champions ultimate is named: Trueshot Barrage?`gayboy`Ezreal
Which champions ultimate is named: Life Form Disintegration Ray?`Vel'koz`Vel
Which champions ultimate is named: Command: Shockwave?`Orianna`ori
Which champions ultimate is named: Children of the Grave?`Mordekaiser`morde
Which champions ultimate is named: Missile Barrage?`Corki
Which champions ultimate is named: Lamb's Respite?`Kindred
Which champions ultimate is named: Paranoia?`Nocturne`noc
Which champions ultimate is named: Crescent Sweep?`Xin Zhao`jin tao`xin
Which champions ultimate is named: Chain of Corruption?`Varus
Which champions ultimate is named: GNAR!`Gnar
Which champions ultimate is named: Unstoppable Force?`Malphite`malph
Which champions ultimate is named: Frozen Tomb?`Lissandra`liss
Which champions ultimate is named: Ravenous Flock?`Swain
Which champions ultimate is named: Summon: Tibbers?`Annie
Which champions ultimate is named: Riftwalk?`Kassadin`kass
Which champions ultimate is named: Insanity Potion?`Singed
Which champions ultimate is named: Transcendent Blades?`Irelia
Which champions ultimate is named: Super Mega Death Rocket!`Jinx
Which champions ultimate is named: Intervention?`Kayle
Which champions ultimate is named: Buster Shot?`Tristana`trist
Which champions ultimate is named: Monsoon?`Janna
Which champions ultimate is named: Pyroclasm?`Brand
Which champions ultimate is named: Depth Charge?`Nautilus`naut
Which champions ultimate is named: The Equalizer?`Rumble
Which champions ultimate is named: Chronoshift?`Zilean`time beard
Which champions ultimate is named: Mercury Cannon/Mercury Hammer?`Jayce`juice
Which champions ultimate is named: The Box?`Thresh
Which champions ultimate is named: Thrill of the Hunt?`Rengar
Which champions ultimate is named: Death Lotus?`Katarina`kat
Which champions ultimate is named: Slicing Maelstrom?`Kennen
Which champions ultimate is named: Explosive Cask?`Gragas
Which champions ultimate is named: Radiance?`Taric
Which champions ultimate is named: Hallucinate?`Shaco
Which champions ultimate is named: Chronobreak?`Ekko
Which champions ultimate is named: Feast?`Cho'gath`cho gath`cho
Which champions ultimate is named: Aspect of the Cougar?`Nidalee`nid
Which champions ultimate is named: Unbreakable Will?`Alistar`ali
Which champions ultimate is named: Vengeful Maelstrom?`Maokai`mao
Which champions ultimate is named: Absolute Zero?`Nunu
Which champions ultimate is named: Cataclysm?`Jarvan`j4
Which champions ultimate is named: Tremors?`Rammus
Which champions ultimate is named: Nether Graps?`Malzahar`malz`
Which champions ultimate is named: Last Breath?`Yasuo
Which champions ultimate is named: The Culling?`Lucian
Which champions ultimate is named: Lunar Rush?`Diana
Which champions ultimate is named: Massacre?`Aatrox
Which champions ultimate is named: Noxian Guillotine?`Darius
Which champions ultimate is named: Soul Shackles?`Morgana`morg
Which champions ultimate is named: Unstoppable Onslaught?`Sion
Which champions ultimate is named: Living ARtiller?`Kog'maw`kog
Which champions ultimate is named: Primordial Burst?`Veigar
Which champions ultimate is named: Dragon's Descent?`Shyvana
Which champions ultimate is named: Demacian Justice?`Garen
Which champions ultimate is named: Ace in the Hole?`Caitlyn
Which champions ultimate is named: Tidal Wave?`Nami
Which champions ultimate is named: Fate's Call?`Kalista
Which champions ultimate is named: Wish?`Soraka
Which champions ultimate is named: Blade of the Exile?`Riven
Which champions ultimate is named: Wild Growth?`Lulu
Which champions ultimate is named: Final Hour?`Vayne
Which champions ultimate is named: Undying Rage?`Tryndamere
Which champions ultimate is named: Noxious Trap?`Teemo`faggot`bitch
Which champions ultimate is named: Cannon Barrage?`Gangplank
Which champions ultimate is named: Sadism?`Dr. Mundo`dr mundo`mundo
Which champions ultimate is named: Chaos Storm?`Viktor
Which champions ultimate is named: Emperor's Divide?`Azir
Which champions ultimate is named: Static Field?`Blitzcrank`Blitz
Which champions ultimate is named: Stranglethorns?`Zyra
Which champions ultimate is named: Chum the Waters?`Fizz
Which champions ultimate is named: Agony's Embrace?`Evelynn`eve
Which champions ultimate is named: Grand Skyfall?`Pantheon`panth
Which champions ultimate is named: Shadow Dance?`Akali
Which champions ultimate is named: Highlander?`Master Yi
Which champions ultimate is named: Omen of Death?`Yorick
Which champions ultimate is named: Final Spark?`Lux
Which champions ultimate is named: Onslaught of Shadows?`Hecarim
Which champions ultimate is named: Stand United?`Shen
Which champions ultimate is named: Assault and Battery?`Vi
Which champions ultimate is named: Abyssal Voyage?`Tahm Kench
Which champions ultimate is named: Dominus?`Renekton
Which champions ultimate is named: Mega Inferno Bomb?`Ziggs
Which champions ultimate is named: Desperate Power?`Ryze
Which champions ultimate is named: Solar Flare?`Leona
Which champions ultimate is named: Impale?`Skarner
Which champions ultimate is named: Grand Challenge?`Fiora
Which champions ultimate is named: Petrifying Gaze?`Cassiopeia`Cass
Which champions ultimate is named: Crescendo?`Sona
Which champions ultimate is named: Death Mark?`Zed
Which champions ultimate is named: Leap of Faith?`Illaoi
Which champions ultimate is named: Dragon's Rage?`Lee Sin
Which champions ultimate is named: Pheonix Stance?`Udyr
Which champions ultimate is named: Whirling Death?`Draven
Which champions ultimate is named: Hyper-Kinteic Position Reverser?`Urgot
Which champions ultimate is named: Idol of Durand?`Galio
Which champions ultimate is named: Glacial Fissure?`Braum
Which champions ultimate is named: Subjugate?`Trundle
Which champions ultimate is named: Unleashed Power?`Syndra
Which champions ultimate is named: Rat-Ta-Tat-Tat?`Twitch
Which champions ultimate is named: Void Rush?`Rek'sai`rek sai
Which champions ultimate is named: Collateral Damage?`Graves
Which champions ultimate is named: Ragnarok?`Olaf
Which champions ultimate is named: Let's Bounce!`Zac
Which champions ultimate is named: Mimic?`Leblanc
Which champions ultimate is named: Grandmaster's Might?`Jax

351
red.py Normal file
View File

@ -0,0 +1,351 @@
from discord.ext import commands
import discord
from cogs.utils import checks
from random import choice as rndchoice
import threading
import datetime, re
import json, asyncio
import copy
import glob
import os
import time
#
# Red, a Discord bot by Twentysix, based on discord.py and its command extension
# https://github.com/Twentysix26/
#
#
# red.py and cogs/utils/checks.py both contain some modified functions originally made by Rapptz
# https://github.com/Rapptz/RoboDanny/tree/async
#
description = """
Red - A multifunction Discord bot by Twentysix
"""
formatter = commands.HelpFormatter(show_check_failure=True)
bot = commands.Bot(command_prefix=["_"], formatter=formatter,
description=description, pm_help=True)
lock = False
@bot.event
async def on_ready():
print('------')
print(bot.user.name + " is now online.")
print('------')
bot.uptime = int(time.perf_counter())
@bot.event
async def on_command(command, ctx):
pass
@bot.event
async def on_message(message):
mod = bot.get_cog('Mod')
author = message.author
if mod is not None:
if checks.settings["OWNER"] == author.id:
await bot.process_commands(message)
return
if not message.channel.is_private:
if discord.utils.get(author.roles, name=checks.settings["ADMIN_ROLE"]) is not None:
await bot.process_commands(message)
return
if discord.utils.get(author.roles, name=checks.settings["MOD_ROLE"]) is not None:
await bot.process_commands(message)
return
if author.id in mod.blacklist_list:
return
if mod.whitelist_list:
if author.id not in mod.whitelist_list:
return
await bot.process_commands(message)
@bot.command()
@checks.is_owner()
async def load(*, module : str):
"""Loads a module"""
module = module.strip()
if not module in list_cogs():
await bot.say("That module doesn't exist.")
return
set_cog(module, True)
try:
bot.load_extension(module)
except Exception as e:
await bot.say('{}: {}'.format(type(e).__name__, e))
else:
await bot.say("Module enabled.")
@bot.command()
@checks.is_owner()
async def unload(*, module : str):
"""Unloads a module"""
module = module.strip()
if not module in list_cogs():
await bot.say("That module doesn't exist.")
return
set_cog(module, False)
try:
bot.unload_extension(module)
except Exception as e:
await bot.say('{}: {}'.format(type(e).__name__, e))
else:
await bot.say("Module disabled.")
@bot.command(name="reload")
@checks.is_owner()
async def _reload(*, module : str):
"""Reloads a module"""
module = module.strip()
if not module in list_cogs():
await bot.say("That module doesn't exist.")
return
set_cog(module, True)
try:
bot.unload_extension(module)
bot.load_extension(module)
except Exception as e:
await bot.say('\U0001f52b')
await bot.say('{}: {}'.format(type(e).__name__, e))
else:
await bot.say("Module reloaded.")
@bot.command(pass_context=True, hidden=True) # Modified function, originally made by Rapptz
@checks.is_owner()
async def debug(ctx, *, code : str):
"""Evaluates code"""
code = code.strip('` ')
python = '```py\n{}\n```'
result = None
try:
result = eval(code)
except Exception as e:
await bot.say(python.format(type(e).__name__ + ': ' + str(e)))
return
if asyncio.iscoroutine(result):
result = await result
result = python.format(result)
if not ctx.message.channel.is_private:
censor = (settings["EMAIL"], settings["PASSWORD"])
r = "[EXPUNGED]"
for w in censor:
result = result.replace(w, r)
result = result.replace(w.lower(), r)
result = result.replace(w.upper(), r)
await bot.say(result)
@bot.command(pass_context=True, hidden=True)
async def setowner(ctx):
"""Sets owner"""
global lock
msg = ctx.message
data = load_settings()
if data["OWNER"] != "id_here":
await bot.say("Owner ID has already been set.")
return
if lock:
await bot.say("A setowner request is already pending. Check the console.")
return
await bot.say("Confirm in the console that you're the owner.")
lock = True
t = threading.Thread(target=wait_for_answer, args=(ctx.message.author,))
t.start()
@bot.command()
@checks.is_owner()
async def shutdown():
"""Shuts down Red"""
exit(1)
@bot.command()
@checks.is_owner()
async def setprefix(*text):
"""Set prefixes"""
if text == ():
await bot.say("Example: setprefix [ ! ^ .")
return
bot.command_prefix = list(text)
data = load_settings()
data["PREFIXES"] = list(text)
with open("data/red/settings.json", "w") as f:
f.write(json.dumps(data))
if len(text) > 1:
await bot.say("Prefixes set")
else:
await bot.say("Prefix set")
@bot.command(name="uptime")
async def _uptime():
up = abs(bot.uptime - int(time.perf_counter()))
up = str(datetime.timedelta(seconds=up))
await bot.say("`Uptime: {}`".format(up))
def wait_for_answer(author):
global lock
print(author.name + " requested to be set as owner. If this is you, type 'yes'. Otherwise press enter.")
print("*DO NOT* set anyone else as owner.")
choice = "None"
while choice.lower() != "yes" and choice == "None":
choice = input("> ")
if choice == "yes":
data = load_settings()
data["OWNER"] = author.id
with open("data/red/settings.json", "w") as f:
f.write(json.dumps(data))
checks.owner = data["OWNER"]
print(author.name + " has been set as owner. A restart is required.")
lock = False
else:
print("setowner request has been ignored.")
lock = False
def load_settings():
try:
with open('data/red/settings.json', "r") as f:
return json.load(f)
except:
raise("Couldn't load credentials.")
def list_cogs():
cogs = glob.glob("cogs/*.py")
clean = []
for c in cogs:
clean.append("cogs." + c.split("\\")[1].replace(".py", ""))
return clean
def check_folders():
folders = ("data", "data/red", "cogs", "cogs/utils")
for folder in folders:
if not os.path.exists(folder):
print("Creating " + folder + " folder...")
os.makedirs(folder)
def check_configs():
settings_path = "data/red/settings.json"
settings = {"EMAIL" : "EmailHere", "PASSWORD" : "PasswordHere", "OWNER" : "id_here", "PREFIXES" : [], "ADMIN_ROLE" : "Transistor", "MOD_ROLE" : "Process"}
if not os.path.isfile(settings_path):
print("Creating new settings.json...")
with open(settings_path, "w") as f:
f.write(json.dumps(settings))
print("Red - First run configuration")
print("If you don't have one, create a NEW ACCOUNT for Red. Do *not* use yours. (https://discordapp.com)")
settings["EMAIL"] = input("\nEmail> ")
settings["PASSWORD"] = input("\nPassword> ")
if not settings["EMAIL"] or not settings["PASSWORD"]:
raise("Email and password cannot be empty.")
if "@" not in settings["EMAIL"]:
raise("Your email is invalid.")
print("\nChoose a prefix (or multiple ones, one at once) for the commands. Type exit when you're done. Example prefix: !")
settings["PREFIXES"] = []
new_prefix = ""
while new_prefix.lower() != "exit":
new_prefix = input("Prefix> ")
if new_prefix.lower() != "exit" and new_prefix != "":
settings["PREFIXES"].append(new_prefix)
print("\nInput *your own* ID. You can type \@Yourname in chat to see it (copy only the numbers).")
print("If you want, you can also do it later with [prefix]setowner. Leave empty in that case.")
settings["OWNER"] = input("\nID> ")
if settings["OWNER"] == "": settings["OWNER"] = "id_here"
print("\nInput the admin role's name. Anyone with this role will be able to use the bot's admin commands")
print("Leave blank for default name (Transistor)")
settings["ADMIN_ROLE"] = input("\nAdmin role> ")
if settings["ADMIN_ROLE"] == "": settings["ADMIN_ROLE"] = "Transistor"
print("\nInput the moderator role's name. Anyone with this role will be able to use the bot's mod commands")
print("Leave blank for default name (Process)")
settings["MOD_ROLE"] = input("\nAdmin role> ")
if settings["MOD_ROLE"] == "": settings["MOD_ROLE"] = "Process"
with open(settings_path, "w") as f:
f.write(json.dumps(settings))
cogs_s_path = "data/red/cogs.json"
cogs = {}
if not os.path.isfile(cogs_s_path):
print("Creating new cogs.json...")
with open(cogs_s_path, "w") as f:
f.write(json.dumps(cogs))
def get_answer():
choices = ("yes", "y", "no", "n")
c = ""
while c not in choices:
c = input(">").lower()
if c.startswith("y"):
return True
else:
return False
def set_cog(cog, value):
with open('data/red/cogs.json', "r") as f:
data = json.load(f)
data[cog] = value
with open('data/red/cogs.json', "w") as f:
f.write(json.dumps(data))
def load_cogs():
with open('data/red/cogs.json', "r") as f:
data = json.load(f)
register = tuple(data.keys()) #known cogs
extensions = list_cogs()
if extensions: print("\nLoading cogs...")
failed = []
for extension in extensions:
if extension in register:
if data[extension]:
try:
bot.load_extension(extension)
except Exception as e:
print(e)
failed.append(extension)
else:
print("\nNew extension: " + extension)
print("Load it?(y/n)")
if get_answer():
data[extension] = True
try:
bot.load_extension(extension)
except Exception as e:
print(e)
failed.append(extension)
else:
data[extension] = False
if extensions:
with open('data/red/cogs.json', "w") as f:
f.write(json.dumps(data))
if failed:
print("\nFailed to load: ", end="")
for m in failed:
print(m + " ", end="")
print("\n")
check_folders()
check_configs()
settings = load_settings()
if __name__ == '__main__':
checks.owner = settings["OWNER"]
load_cogs()
bot.command_prefix = settings["PREFIXES"]
bot.run(settings['EMAIL'], settings['PASSWORD'])

2
startRed.bat Normal file
View File

@ -0,0 +1,2 @@
python red.py
pause

7
startRedLoop.bat Normal file
View File

@ -0,0 +1,7 @@
@Echo off
:Start
python red.py
timeout 3
goto Start