Compare commits

..

121 commits
next ... master

Author SHA1 Message Date
4241d54efd Merge pull request 'Fixing issue where woomy would endlessly type from an api error' (#2) from ItzRock/woomy:master into master
Reviewed-on: embee/woomy#2
2022-12-17 10:30:00 +00:00
eb9c98612a Fixing issue where woomy would endlessly type from an api error 2022-02-19 22:18:39 +00:00
7cd499e10c Merge pull request 'Update 'resources/other/lyrics.json'' (#1) from f3d0r4/woomy:master into master
Reviewed-on: embee/woomy#1
2021-12-28 07:47:19 +00:00
bc18ea8abd Update 'resources/other/lyrics.json'
Fixed typos of capitalization in lyrics as this would cause the command to unexpectedly fail
2021-11-25 19:36:15 +00:00
90a0aea5bf 1.4.8 (music stuff) 2021-10-15 22:29:21 +11:00
ddb81ed114 minor changes to invidious endpoint format 2021-10-15 22:29:12 +11:00
55c546aa6a remove hardcoded invidious instances 2021-10-15 22:28:24 +11:00
3e80f2c5a2 updated to 1.4.7 2021-09-17 12:38:34 +10:00
5289977fb5 fix incorrect help info 2021-09-17 12:38:25 +10:00
684d49ae5b module updates 2021-09-17 12:38:15 +10:00
82bfed57aa YOUTHUBE FUCKING DSOTP CHANGING MSHIT FUCKER 2021-05-28 22:26:53 +10:00
22ac7bee2e include link to message in messageUpdate logs 2021-05-13 09:12:42 +10:00
f24757fedf update deps 2021-05-13 09:01:28 +10:00
05541fe9be GO AWYA FLIES
AND OTHER GROSS BUGS
2021-04-29 12:22:30 +10:00
2564f742d4 dont silently fail when API fetch fails 2021-04-28 14:50:58 +10:00
2481dacb91 WASNT MY FAULT SHIT BROKE BLAME YOUTUBE 2021-04-13 17:25:31 +10:00
f09567b239 THANK YOU FOR UNANNOUNCED API CHANGES 2021-04-13 17:25:16 +10:00
8f271a9a4e why fix bugs properly when you can ignore them 2021-04-03 15:14:12 +11:00
67c9fdfd3a bug fixes 2021-04-03 15:13:08 +11:00
5d9bbb4431 fix user error resp msg 2021-04-03 15:00:56 +11:00
26a39a76fc stage channels 2021-04-03 15:00:43 +11:00
878cab71e6 clear music msg channel on dispatcher end 2021-03-18 13:44:03 +11:00
479eeeea44 SHE CNA FUCKIGN SING AGAIN 2021-03-18 13:02:59 +11:00
1feb88451c stupid ass bitch bot 2021-03-18 12:10:09 +11:00
fa99b7b1a1 missing config values 2021-03-18 12:09:28 +11:00
c59bf6c245 oopsie 2021-03-01 13:05:47 +11:00
58c90ddd9d 1.4 - splatoon commands! 2021-03-01 12:58:39 +11:00
9373d9b2de THINGS 2021-03-01 12:58:28 +11:00
45d600ab27 add reactions intent 2021-03-01 12:58:11 +11:00
75b2db1a97 Merge branch 'master' of https://github.com/mudkipscience/woomy 2021-03-01 11:56:39 +11:00
42bb347bbf update dependencies 2021-03-01 11:56:33 +11:00
flgx
9326a2da3e
Merge pull request #23 from AStainlessSteelSink/master
Bind to SIGINT so Ctrl+C properly shuts down the bot
2021-02-24 08:45:13 +00:00
Lucian
0f587bcfff
Add bind to SIGINT 2021-02-23 12:58:40 -08:00
8058f3dced
Update README.md 2020-11-09 01:39:36 +00:00
8fc98efe55 new restart command x2 2020-10-29 20:23:34 +11:00
a2f46051e1 working restart command 2020-10-29 20:16:41 +11:00
00196b201d new api 2020-10-27 15:06:27 +11:00
9bf1a81143 update to 1.3.13 2020-10-23 12:34:41 +11:00
98255e73aa new garfield command 2020-10-23 12:34:20 +11:00
ef0e2d8594 update version 2020-10-23 12:15:05 +11:00
a581f07088 remove fields dependent on presence data 2020-10-23 12:14:40 +11:00
7112c8ff9d update dependencies 2020-10-23 12:14:31 +11:00
564814a3de start requesting only the intents we need 2020-10-23 12:14:23 +11:00
05b35fc207 wtf lol 2020-10-05 18:42:06 +11:00
ffd056972d fix coinflip 2020-10-05 18:38:22 +11:00
83990e47f1 Merge branch 'master' of https://github.com/mudkipscience/woomy 2020-10-03 10:53:42 +10:00
1fba1e9a4b 1.3.10 2020-10-03 10:53:38 +10:00
f31f75ae79 no longer crashes when invalid equation is entered 2020-10-03 10:53:16 +10:00
ba4781f0f4 request intents from gateway 2020-10-03 10:53:00 +10:00
FLGX
6d1d4a0441
Do not exit on uncaughtException
I think I forgot this here while testing something
2020-08-29 20:58:35 +02:00
18db7e597d update version number 2020-08-16 18:21:04 +10:00
3dcdd1f2ad rate can no longer ping roles 2020-08-16 18:20:26 +10:00
4bbdac7070 Renamed blacklist to blocklist 2020-08-16 18:19:28 +10:00
61e6951833 totally didnt steal this fron nyandroid 2020-08-05 17:08:56 +10:00
90e9793377 update to 1.3.7 2020-08-02 13:35:17 +10:00
0009d569ca actually fixed fixmusic 2020-08-02 13:35:09 +10:00
d257d6e730 fixed "you cant vote twice" bug 2020-07-30 19:13:44 +10:00
808659246e say command can no longer mention roles 2020-07-30 19:04:54 +10:00
ce10038a95 update version.json 2020-07-30 19:04:28 +10:00
TheCakeChicken
f5a636b527
Disable command 2020-06-28 23:18:16 +01:00
21d4df30b3 disabled neko/nekogif 2020-06-18 20:46:42 +10:00
Lukáš Horáček
101c1581e9
enable nekogif 2020-06-17 13:55:28 +02:00
92c27be3be updated version 2020-06-17 18:13:41 +10:00
0c6e018580 added wag 2020-06-17 18:13:33 +10:00
514d1d15bc renamed foxgirl kitsune 2020-06-17 18:13:26 +10:00
ab59d90bda re-enabled neko and nekogif 2020-06-17 18:12:41 +10:00
Lukáš H
f8d9ec1e2f
remove stack print 2020-06-06 11:24:35 +02:00
Lukáš H
5cf74a65ab
revert 2020-06-06 11:24:12 +02:00
Lukáš H
95ce384eee
add local=true to invidious 2020-06-06 11:15:12 +02:00
Lukáš H
d9ac55f8a1
print stack of error 2020-06-06 11:05:11 +02:00
Lukáš H
d92f9ffb8b
fix 2020-06-06 10:49:32 +02:00
Lukáš H
6412ea346d
remove debugs 2020-06-06 10:38:00 +02:00
Lukáš H
de956b5197
use invidious for music instead of youtube 2020-06-06 10:37:13 +02:00
Lukáš H
a155b7dde7
add back highwatermark 2020-06-06 10:24:35 +02:00
Lukáš H
07c9972ce0
use git version of ytdl-core-discord 2020-06-06 10:24:22 +02:00
Lukáš H
52197a939e
remove watermark and see if it works 2020-06-06 10:22:10 +02:00
Lukáš H
feab4749b3
more debug 2020-06-06 10:18:53 +02:00
Lukáš H
8de3c6ccad
Music debugs, cant reproduce locally 2020-06-06 10:14:56 +02:00
Lukáš H
8575fb7906
log music dispatcher errors 2020-06-06 10:07:27 +02:00
Lukáš H
d585ffa45c
fix music fixer inside of play function 2020-06-06 09:57:46 +02:00
47f163dcab forgot to remove stuff from v2 2020-05-30 13:59:50 +10:00
7a1964fb4c pride update cause i couldn't wait until june 2020-05-30 13:55:04 +10:00
dddaeba8e3 fixmusic can be used by users, invidious issues 2020-05-28 17:52:15 +10:00
ac5d3dc78c bot can no longer use @here 2020-05-22 12:16:57 +10:00
agentdoesnotexist
ebc0b198f0 Fixed typo 2020-05-20 16:54:20 +02:00
Lukáš H
f9d7743caf Merge branch 'master' of github.com:woomyware/woomy 2020-05-12 10:42:03 +02:00
Lukáš H
63f5dbc6d3
message.content: Remove zero-width characters. 2020-05-12 10:41:48 +02:00
7c33e44e00 disable typing for music 2020-05-09 16:48:25 +10:00
e633c6b65a update version 2020-05-09 16:47:06 +10:00
b6b810b4de fixed skip + rate 2020-05-09 16:43:30 +10:00
Lukáš H
1837e6e751 Merge branch 'master' of github.com:mudkipscience/woomy 2020-05-04 22:04:42 +02:00
Lukáš H
40b9a4dd93
discordapp.com -> discord.com 2020-05-04 22:04:40 +02:00
cc7222bec0 Merge branch 'master' of https://github.com/mudkipscience/woomy 2020-05-02 18:49:03 +10:00
b2b5431ee4 fixed bugs 2020-05-02 18:48:58 +10:00
e60985dbac
Merge pull request #17 from IFcoltransG/patch-1
Spelling mistake in Bohemian Rhapsody description
2020-05-02 12:14:35 +10:00
IFcoltransG
bdbea2abb9
Spelling mistake in Bohemian Rhapsody description 2020-05-02 13:14:28 +12:00
fef8c0e5b0 update changelog 2020-04-30 14:48:56 +10:00
59084b07cb Add new music commands 2020-04-30 14:44:23 +10:00
42df6b71c7 backport new ship command 2020-04-30 14:11:02 +10:00
0b8c4ec38d player monitor to hopefully help music break less 2020-04-30 14:06:41 +10:00
6d60845546 new music module 2020-04-30 14:06:15 +10:00
d1acf688c9 update music commands to support new module 2020-04-30 14:06:09 +10:00
def26feab3 update rip.js to use node-fetch instead of request 2020-04-30 13:32:19 +10:00
d07a680b77 update configTemplate 2020-04-30 13:18:44 +10:00
a5ee79476f update/remove dependencies 2020-04-30 13:16:49 +10:00
0cb1d15f12 remove music functions from functions.js 2020-04-30 13:10:53 +10:00
7eab55b981 disabled problematic commands 2020-04-21 17:33:18 +10:00
64aa46a04b Merge branch 'master' of https://github.com/mudkipscience/woomy 2020-04-21 17:09:32 +10:00
debd47fe02 cmd.conf.enabled actually does something now 2020-04-21 17:09:27 +10:00
7e4b355627 update version 2020-04-21 17:06:03 +10:00
5fd8da2702 fixed skip command 2020-04-21 17:05:40 +10:00
536c6f2b2a
Update package.json 2020-04-20 02:49:36 +00:00
TheCakeChicken
f702254603 actually disable potentially NSFW commands 2020-04-19 00:40:05 +01:00
TheCakeChicken
128f12041e Merge branch 'master' of github.com:mudkipscience/Woomy 2020-04-19 00:23:02 +01:00
TheCakeChicken
79b14f60aa Remove potentially NSFW content 2020-04-19 00:22:57 +01:00
FLGX
57ad4914f8
set volume to 25% by default for now before v2 woomy is released 2020-04-18 21:34:41 +02:00
0662be72d1
why are unhandled rejections trying to log a stack 2020-04-18 04:11:13 +00:00
c188356030 update ytdl-core 2020-04-17 17:14:42 +10:00
FLGX
276c26d3c7
remove member username/id print on command 2020-04-08 11:10:44 +02:00
FLGX
c7d3ecd6da
Fix music in v1 woomy 2020-04-08 11:04:52 +02:00
TheCakeChicken
b81db48f7b
typo 2020-03-30 23:28:16 +01:00
177 changed files with 6387 additions and 6090 deletions

View file

@ -1,18 +0,0 @@
module.exports = {
env: {
es6: true,
node: true
},
extends: [
'standard'
],
globals: {
Atomics: 'readonly',
SharedArrayBuffer: 'readonly'
},
parserOptions: {
ecmaVersion: 2018
},
rules: {
}
}

6
.gitignore vendored
View file

@ -1,3 +1,5 @@
.vscode
*config.js
node_modules
data
config.js
package-lock.json
.env

661
LICENSE
View file

@ -1,661 +0,0 @@
GNU AFFERO GENERAL PUBLIC LICENSE
Version 3, 19 November 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 Affero General Public License is a free, copyleft license for
software and other kinds of works, specifically designed to ensure
cooperation with the community in the case of network server software.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
our General Public Licenses are 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.
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.
Developers that use our General Public Licenses protect your rights
with two steps: (1) assert copyright on the software, and (2) offer
you this License which gives you legal permission to copy, distribute
and/or modify the software.
A secondary benefit of defending all users' freedom is that
improvements made in alternate versions of the program, if they
receive widespread use, become available for other developers to
incorporate. Many developers of free software are heartened and
encouraged by the resulting cooperation. However, in the case of
software used on network servers, this result may fail to come about.
The GNU General Public License permits making a modified version and
letting the public access it on a server without ever releasing its
source code to the public.
The GNU Affero General Public License is designed specifically to
ensure that, in such cases, the modified source code becomes available
to the community. It requires the operator of a network server to
provide the source code of the modified version running there to the
users of that server. Therefore, public use of a modified version, on
a publicly accessible server, gives the public access to the source
code of the modified version.
An older license, called the Affero General Public License and
published by Affero, was designed to accomplish similar goals. This is
a different license, not a version of the Affero GPL, but Affero has
released a new version of the Affero GPL which permits relicensing under
this license.
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 Affero 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. Remote Network Interaction; Use with the GNU General Public License.
Notwithstanding any other provision of this License, if you modify the
Program, your modified version must prominently offer all users
interacting with it remotely through a computer network (if your version
supports such interaction) an opportunity to receive the Corresponding
Source of your version by providing access to the Corresponding Source
from a network server at no charge, through some standard or customary
means of facilitating copying of software. This Corresponding Source
shall include the Corresponding Source for any work covered by version 3
of the GNU General Public License that is incorporated pursuant to the
following paragraph.
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 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 work with which it is combined will remain governed by version
3 of the GNU General Public License.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU Affero 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 Affero 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 Affero 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 Affero 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 Affero 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 Affero General Public License for more details.
You should have received a copy of the GNU Affero 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 your software can interact with users remotely through a computer
network, you should also make sure that it provides a way for users to
get its source. For example, if your program is a web application, its
interface could display a "Source" link that leads users to an archive
of the code. There are many ways you could offer source, and different
solutions will be better for different programs; see section 13 for the
specific requirements.
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 AGPL, see
<http://www.gnu.org/licenses/>.

22
LICENSE.md Normal file
View file

@ -0,0 +1,22 @@
MIT License
Copyright (c) 2018 YorkAARGH
Copyright (c) 2018-2020 mudkipscience
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View file

@ -1,37 +1,26 @@
# Woomy
![Status](https://top.gg/api/widget/status/435961704145485835.svg)
![Servers](https://top.gg/api/widget/servers/435961704145485835.svg)
![Discord](https://img.shields.io/discord/410990517841690625)
![Version](https://img.shields.io/github/package-json/v/mudkipscience/woomy)
![License](https://img.shields.io/github/license/mudkipscience/woomy)
Woomy is a all-purpose discord bot built off the [guidebot](https://github.com/AnIdiotsGuide/guidebot) base and coded in node.js using discord.js.
## A feature-rich and configurable Discord bot for music, moderation, currency and more!
# Notice
Woomy v1 (this repository) is currently only being maintained. Bugs and issues will be fixed if they come up, but no new features will be added. Pull requests that add new features to Woomy should instead be contributed to the version 2 codebase, found [here](https://github.com/woomyware/v2).
**Links**
* [Official bot invite](https://discord.com/oauth2/authorize?client_id=435961704145485835&permissions=2134240503&scope=bot)
* [For updates and support join my Discord server!](https://discord.gg/HCF8mdv)
When Woomy v2 is released, Woomy v1 will no longer be maintained.
## Using Woomy
# How to use
The easiest way to use Woomy is to invite it to your server with [this link.](https://discord.com/oauth2/authorize?client_id=435961704145485835&permissions=2134240503&scope=bot) It is hosted 24/7 and automatically updates itself when a new release is made available, making sure you always get the newest features.
The easiest and recommended way to use Woomy is to invite the official version to your server, which is hosted 24/7 and gets the newest updates as soon as they come out. The invite can be found above, under links. You can also self-host, but no support will be provided to you if you decide to do this.
You can also self-host! Some modifications to the code will need to be made before Woomy will run on your machine, but anyone who can read errors will figure out what needs to be changed pretty quickly :P
## Contributors
# Requirements
- git
- node.js v12.0.0 or higher
- node-gyp build tools
- ffmpeg (or ffmpeg-static)
Thanks to the following people who have contributed to Woomy:
# Installation
- Clone Woomy to your machine
- Run `npm i` in Woomy's directory
- Open config.js in your code editor and insert all the required information
* [@mudkipscience](https://github.com/mudkipscience/) - Creator and primary developer of Womy
* [@FLGX](https://github.com/FLGX06/) - Developer, basically wrote the entirety of the music commands and lots of other cool stuff
* [@TheCakeChicken](https://github.com/TheCakeChicken/) - Developer
And a few other people as well. Check out the [Contributors](https://github.com/mudkipscience/woomy/graphs/contributors) tab!
## Legal stuff
### Using our code
If you wish to use our code in your project, please credit us! We don't mind you using Woomy's code (it is open source for a reason :P) as long as you dont blatantly copy it and/or refrain from crediting us.
### License
Copyright (C) 2018-2020 Emily J. / mudkipscience and contributors.
Copyrights licensed under the GNU AGPLv3 License, see the accompanying LICENSE file for details.
# Contributing
If you wish to contribute to Woomy, please fork the repository and open a pull request. Any contribution is appreciated <3

View file

@ -1,14 +0,0 @@
{
"responses": [
"No darndested clue.",
"¯\\_(ツ)_/¯",
"Stupid question. You should be ashamed of yourself for even asking.",
"Yes!",
"Not in your wildest dreams!",
"No chance.",
"Never.",
"Possibly.",
"There\"s a high chance.",
"I\"d rather not say."
]
}

View file

@ -1,21 +0,0 @@
{
"coolPeople": [
"448354605617643520",
"433790467830972417",
"231777839576252417",
"285992938314661899",
"231704701433937931",
"324937993972350976",
"336492042299637771",
"273867501006225419",
"331870539897372672",
"304000458144481280",
"239787232666451980",
"264970229514371072",
"254310746450690048",
"358390849807319040",
"211011138656272386",
"266472557740425216",
"102943767346057216"
]
}

View file

@ -1,102 +0,0 @@
{
"aesthetic attraction": {
"name": "aesthetic attraction",
"description": "Getting pleasure from the appearance of a specific individual like you would from watching beautiful scenery."
},
"platonic attraction": {
"name": "platonic attraction",
"description": "A desire to have a platonic relationship or friendship with a specific individual."
},
"romantic attraction": {
"name": "romantic attraction",
"description": "A desire to have a romantic relationship with a specific individual."
},
"sensual attraction": {
"name": "sensual attraction",
"description": "A desire for physical intimacy with a specific individual. Cuddling, hand holding, etc."
},
"sexual attraction": {
"name": "sexual attraction",
"description": "A desire for sexual contact with a specific individual."
},
"abrosexual": {
"name": "abrosexual",
"description": "Someone whose sexuality changes frequently. They experience different sexualities over time."
},
"androgynosexual": {
"name": "androgynosexual",
"description": "Someone who is attracted to both men and women, particularly those who are androgynous in appearance."
},
"androsexual": {
"name": "androsexual",
"description": "Someone who is attracted to men and/or masculine people."
},
"aromantic": {
"name": "aromantic",
"description": "Someone who does not experience romantic attraction. They do not have to also be asexual however as they may still experience other types of attraction."
},
"asexual": {
"name": "asexual",
"description": "Someone who feels little to no sexual attraction to anyone."
},
"bisexual": {
"name": "bisexual",
"description": "Someone who is attracted to more than one gender."
},
"ceterosexual": {
"name": "ceterosexual",
"description": "Someone who is attracted to non-binary people."
},
"demisexual": {
"name": "demisexual",
"description": "Someone who doesn't experience sexual/romantic attraction towards someone until they form an emotional connection."
},
"finsexual": {
"name": "finsexual",
"description": "Someone who is attracted to women and/or feminine people."
},
"gay": {
"name": "gay",
"description": "Someone who is homosexual (attracted to ones own gender)"
},
"gynosexual": {
"name": "gynosexual",
"description": "Someone who as attracted to women and/or feminity."
},
"grey-romantic": {
"name": "grey-romantic",
"description": "Someone with a romantic orentiation that is somewhere between aromantic and romantic."
},
"heterosexual": {
"name": "heterosexual",
"description": "Someone who is attracted to people of the opposite gender."
},
"homosexual": {
"name": "homosexual",
"description": "Someone attracted to people of ones own gender."
},
"lesbian": {
"name": "lesbian",
"description": "A woman who is attracted to other women."
},
"omnisexual": {
"name": "omnisexual",
"description": "Someone who is attracted to all genders."
},
"pansexual": {
"name": "pansexual",
"description": "Someone who is attracted towards people regardless of their gender identity."
},
"pomosexual": {
"name": "pomosexual",
"description": "Someone who does not fit into any sexual orientation label."
},
"polysexual": {
"name": "polysexual",
"description": "Someone who is attracted to some, but not all genders."
},
"straight": {
"name": "straight",
"description": "Someone who is heterosexual (attracted to people of the opposite gender)"
}
}

View file

@ -1,13 +0,0 @@
Woomy 2.0:
- A lot of Woomy's code has been rewritten
- Woomy now uses MongoDB for settings storage instead of enmap
- Logger now logs which file a log came from
- Functions file has been separated into multiple helpers
- Added systemNotice feature, stops Woomy from outputting permission errors and stuff
- New ping command
- help command overhauled
- added `pride` command
- eval now dm's errors to the user who ran the command
- ship command overhauled
- added volume command
- usage errors are now shown in an embed

View file

@ -1,20 +0,0 @@
exports.conf = {
enabled: true,
guildOnly: false,
aliases: [],
permLevel: 'User',
requiredPerms: [],
cooldown: 2000 // miliseconds
}
exports.help = {
name: '',
category: '',
description: '',
usage: '',
params: ''
}
exports.run = async (client, message, args, level, data) => {
// epic code goes here
}

View file

@ -1,25 +0,0 @@
// Copyright 2020 Emily J. / mudkipscience and contributors. Subject to the AGPLv3 license.
exports.conf = {
enabled: true,
guildOnly: false,
aliases: [],
permLevel: 'User',
requiredPerms: [],
cooldown: 2000
}
exports.help = {
name: '8ball',
category: 'Fun',
description: 'Retrieves an answer to your question from the almighty 8ball.',
usage: '`8ball [question]` - Retrieves an answer from 8ball based on the question or sentence provided.',
parameters: '`question` - the question you want to ask'
}
// eslint-disable-next-line no-unused-vars
const responses = require('../assets/json/8ball.json').responses
exports.run = async (client, message, args, level, data) => {
// Finish later
}

View file

@ -1,43 +0,0 @@
// Copyright 2020 Emily J. / mudkipscience and contributors. Subject to the AGPLv3 license.
exports.conf = {
enabled: true,
guildOnly: false,
aliases: ['enlarge'],
permLevel: 'User',
requiredPerms: []
}
exports.help = {
name: 'emoji',
category: 'Utility',
description: 'Enlarges a custom emoji (cannot be used to enlarge normal emojis)',
usage: 'emoji [emoji]',
parameters: '`[emoji] - Custom emoji you want to enlarge'
}
exports.run = async (client, message, args) => {
if (!args[0]) {
return client.userError(message, exports, 'Missing argument, the `emoji` argument is required!')
};
var ID
var format = '.png'
var string = args[0].replace(/\D/g, '')
if (args[0].charAt(1) === 'a' && args[0].charAt(2) === ':') {
format = '.gif'
};
if (string.length > 18) {
ID = string.slice(string.length - 18)
} else {
ID = string
};
if (!ID) {
return message.channel.send('<:error:466995152976871434> This command only works with custom emojis, sorry ;~;')
}
message.channel.send('https://cdn.discordapp.com/emojis/' + ID + format)
}

View file

@ -1,52 +0,0 @@
// Copyright 2020 Emily J. / mudkipscience and contributors. Subject to the AGPLv3 license.
/* eslint-disable no-eval */
exports.conf = {
enabled: true,
guildOnly: false,
aliases: [],
permLevel: 'Developer',
requiredPerms: []
}
exports.help = {
name: 'eval',
category: 'Developer',
description: 'Evaluates arbitrary javascript.',
usage: 'eval [code]',
parameters: '`[code] - Javascript code you want to execute.'
}
exports.run = async (client, message, args, level, data) => {
const hastebin = require('hastebin-gen')
const code = args.join(' ')
try {
const evaled = eval(code)
const clean = await client.clean(client, evaled)
if (clean.length > 2000) {
hastebin(clean, { extension: 'txt' }).then(haste => {
return message.channel.send('`OUTPUT`\n' + haste)
}).catch(error => {
client.logger.error(error)
})
return
}
message.channel.send(`\`OUTPUT\` \`\`\`js\n${await clean}\n\`\`\``)
} catch (err) {
const errclean = await client.clean(client, err)
if (errclean.length > 2000) {
hastebin(errclean, { extension: 'txt' }).then(haste => {
return message.channel.send('`ERROR`\n' + haste)
}).catch(error => {
client.logger.error(error)
})
return
}
message.author.send(`\`ERROR\` \`\`\`xl\n${await errclean}\n\`\`\``)
message.react('⚠️')
}
}

View file

@ -1,103 +0,0 @@
// Copyright 2020 Emily J. / mudkipscience and contributors. Subject to the AGPLv3 license.
exports.conf = {
enabled: true,
guildOnly: false,
aliases: ['commands', 'cmds'],
permLevel: 'User',
requiredPerms: ['EMBED_LINKS'],
cooldown: 2000
}
exports.help = {
name: 'help',
category: 'Bot',
description: 'Lists all commands Woomy has, what they do, and how to use them.',
usage: '`help` - Shows the embed that provides info on how to use woomy. `help all` - Lists all commands.\n`help <command>` - Show detailed information on how to use the specified command.',
parameters: '`command` - The name of the command you want more information on.'
}
const Discord = require('discord.js')
exports.run = (client, message, args, level, data) => {
const embed = new Discord.MessageEmbed()
embed.setColor(client.embedColour(message.guild))
const commands = client.commands
const categories = []
commands.forEach((cmd) => {
if (!categories.includes(cmd.help.category)) {
if (cmd.help.category === 'Developer' && !client.config.devs.includes('message.author.id')) {
return
}
categories.push(cmd.help.category)
}
})
if (!args[0]) {
let uPrefix = '`' + data.user.prefix + '`'
let gPrefix = ''
if (client.config.defaultPrefix === data.user.prefix) {
uPrefix = 'None set, use: `~myprefix'
}
if (message.guild) {
gPrefix = 'Server Prefix: `' + data.guild.prefix + '`'
if (client.config.defaultPrefix === data.guild.prefix) {
gPrefix = 'Server Prefix: None set, use: `~prefix`'
}
}
embed.setTitle('Help & Commands')
embed.setDescription('')
if (client.version.news.length > 0) {
embed.addField('**News**', client.version.news)
}
embed.addField('**Prefixes**', `Default Prefix: \`${client.config.defaultPrefix}\`\nUser Prefix: ${uPrefix}\nServer Prefix: ${gPrefix}`)
embed.addField('**Command Syntax**', 'For arguments in commands:\n» Arguments in `[]` brackets are required.\n» Arguments in `<>` brackets are optional.\n» Arguments prefixed with `-` are flags, and are placed at the start of the command (`avatar -jpg mudkipscience`)')
embed.addField('**Commands**', `Use \`${message.prefix}help all\` to view all commands, or \`${message.prefix}help <command>\` for more information on a specific command.\n\n[Bot Invite](https://discord.com/oauth2/authorize?client_id=${client.user.id}&permissions=2134240503&scope=bot) | [Discord Server](https://discord.gg/HCF8mdv) | [GitHub](https://github.com/mudkipscience/woomy) | [Vote for me!](https://top.gg/bot/435961704145485835/vote)`)
return message.channel.send(embed)
} else if (args[0] === 'all') {
embed.setTitle('Commands')
categories.sort().forEach((cat) => {
const filtered = commands.filter((cmd) => cmd.help.category === cat)
embed.addField('**' + cat + '**', filtered.map((cmd) => '`' + cmd.help.name + '`').join(', '))
})
if (message.guild && data.guild.customCommands.length > 0) {
embed.addField('**Custom**', data.guild.customCommands.map((cmd) => '`' + cmd.name + '`').join(' '))
}
return message.channel.send(embed)
} else {
const command = args.shift().toLowerCase()
const cmd = commands.get(command) || commands.get(client.aliases.get(command))
if (!cmd) {
return message.channel.send('Command/alias doesn\'t exist')
}
let aliases = ''
if (cmd.conf.aliases.length > 0) {
aliases = '`' + cmd.conf.aliases.join('`, `') + '`'
}
embed.setTitle(`${cmd.help.category} -> ${cmd.help.name}`)
embed.setDescription(cmd.help.description)
embed.addField('**Usage**', cmd.help.usage)
if (cmd.help.parameters.length > 0) {
embed.addField('**Parameters**', cmd.help.parameters)
}
if (aliases) {
embed.addField('**Aliases**', aliases)
}
embed.addField('**Rank required**', cmd.conf.permLevel, true)
embed.addField('**Server only**', cmd.conf.guildOnly, true)
embed.addField('**Cooldown**', cmd.conf.cooldown / 1000 + ' seconds', true)
embed.setFooter('< > = optional, [ ] = required. Don\'t include the brackets in the command itself!')
message.channel.send(embed)
}
}

View file

@ -1,22 +0,0 @@
// Copyright 2020 Emily J. / mudkipscience and contributors. Subject to the AGPLv3 license.
exports.conf = {
enabled: true,
guildOnly: false,
aliases: [],
permLevel: 'User',
requiredPerms: [],
cooldown: 2000
}
exports.help = {
name: 'invite',
category: 'Bot',
description: 'Sends a link to my support/development server.',
usage: 'invite',
parameters: ''
}
exports.run = async (client, message, args, level, data) => {
message.channel.send(`Here you go! I hope you enjoy using me ^-^\n<https://discord.com/oauth2/authorize?client_id=${client.user.id}&permissions=2134240503&scope=bot>`)
}

View file

@ -1,27 +0,0 @@
// Copyright 2020 Emily J. / mudkipscience and contributors. Subject to the AGPLv3 license.
exports.conf = {
enabled: true,
guildOnly: false,
aliases: ['plevel', 'permlevel'],
permLevel: 'User',
requiredPerms: [],
cooldown: 2000
}
exports.help = {
name: 'level',
category: 'Bot',
description: 'Returns your permission level.',
usage: 'level',
parameters: ''
}
exports.run = async (client, message, args, level, data) => {
try {
const friendly = client.config.permLevels.find(l => l.level === level).name
message.reply(`Your permission level is: ${friendly} (${level})`)
} catch (err) {
message.channel.send('There was an error!\n' + err).catch()
}
}

View file

@ -1,36 +0,0 @@
// Copyright 2020 Emily J. / mudkipscience and contributors. Subject to the AGPLv3 license.
exports.conf = {
enabled: true,
guildOnly: false,
aliases: [],
permLevel: 'User',
requiredPerms: [],
cooldown: 2000 // miliseconds
}
exports.help = {
name: 'myprefix',
category: 'Settings',
description: 'Shows or changes the prefix Woomy uses for you.',
usage: '`myprefix` <prefix | "reset">',
parameters: ''
}
exports.run = async (client, message, args, level, data) => {
const prefix = args.join(' ')
if (!prefix) {
return message.channel.send(`Your current prefix is: \`${data.user.prefix}\``)
}
if (prefix.toLowerCase() === 'reset') {
await client.updateUser(message.author, { prefix: client.config.defaultPrefix })
return message.channel.send('Your prefix has been reset.')
}
await client.updateUser(message.author, { prefix: prefix })
message.channel.send(`Your prefix has been updated: \`${prefix}\``)
}

View file

@ -1,25 +0,0 @@
// Copyright 2020 Emily J. / mudkipscience and contributors. Subject to the AGPLv3 license.
exports.conf = {
enabled: true,
guildOnly: false,
aliases: [],
permLevel: 'User',
requiredPerms: [],
cooldown: 2000
}
exports.help = {
name: 'ping',
category: 'Bot',
description: 'Check if bot is dying.',
usage: 'ping',
parameters: ''
}
exports.run = async (client, message, args, level, data) => {
const msg = await message.channel.send('Pinging...')
msg.edit(
`Pong! \`${msg.createdTimestamp - message.createdTimestamp}ms\` (💗 \`${Math.round(client.ws.ping)}ms\`)`
)
}

View file

@ -1,23 +0,0 @@
// Copyright 2020 Emily J. / mudkipscience and contributors. Subject to the AGPLv3 license.
exports.conf = {
enabled: true,
guildOnly: true,
aliases: [],
permLevel: 'User',
requiredPerms: ['CONNECT', 'SPEAK'],
cooldown: 5000
}
exports.help = {
name: 'play',
category: 'Music',
description: 'Plays the song you request, or adds it to the queue.',
usage: 'playnext [song]',
parameters: '[song] - The name or youtube URL of the song you want to play.'
}
const { play } = require('../utils/music')
exports.run = async (client, message, args, level, data) => {
await play(client, data.guild.music, message, args.join(' '), false)
}

View file

@ -1,23 +0,0 @@
// Copyright 2020 Emily J. / mudkipscience and contributors. Subject to the AGPLv3 license.
exports.conf = {
enabled: true,
guildOnly: true,
aliases: [],
permLevel: 'User',
requiredPerms: ['CONNECT', 'SPEAK'],
cooldown: 5000
}
exports.help = {
name: 'playnext',
category: 'Music',
description: 'Similar to play, but adds it to the start of the queue instead of the end.',
usage: 'playnext [song]',
parameters: '[song] - The name or youtube URL of the song you want to play.'
}
const { play } = require('../utils/music')
exports.run = async (client, message, args, level, data) => {
await play(client, data.guild.music, message, args.join(' '), true)
}

View file

@ -1,36 +0,0 @@
// Copyright 2020 Emily J. / mudkipscience and contributors. Subject to the AGPLv3 license.
exports.conf = {
enabled: true,
guildOnly: false,
aliases: [],
permLevel: 'User',
requiredPerms: [],
cooldown: 2000 // miliseconds
}
exports.help = {
name: 'prefix',
category: 'Settings',
description: 'Shows or changes the prefix Woomy uses for this server.',
usage: 'prefix ',
params: ''
}
exports.run = async (client, message, args, level, data) => {
const prefix = args.join(' ')
if (!prefix) {
return message.channel.send(`Current server prefix: \`${data.guild.prefix}\``)
}
if (prefix.toLowerCase() === 'reset') {
await client.updateGuild(message.guild, { prefix: client.config.defaultPrefix })
return message.channel.send('Server prefix has been reset.')
}
await client.updateGuild(message.guild, { prefix: prefix })
message.channel.send(`The server prefix has been updated: \`${prefix}\``)
}

View file

@ -1,32 +0,0 @@
exports.conf = {
enabled: true,
guildOnly: false,
aliases: [],
permLevel: 'Developer',
requiredPerms: [],
cooldown: 2000
}
exports.help = {
name: 'reload',
category: 'Developer',
description: 'Reloads a command without having to restart the whole bot.',
usage: 'reload [command]',
parameters: '[command] - command you want to reload'
}
exports.run = async (client, message, args) => { // eslint-disable-line no-unused-vars
if (!args || args.length < 1) {
return message.channel.send(
`<:error:466995152976871434> You must provide a command to reload! Usage: \`${client.commands.get('reload').help.usage}\``
)
}
let response = await client.unloadCommand(args[0])
if (response) return message.channel.send(`<:error:466995152976871434> Error unloading: ${response}`)
response = client.loadCommand(args[0])
if (response) return message.channel.send(`<:error:466995152976871434> Error loading: ${response}`)
message.channel.send(`<:success:466995111885144095> \`${args[0]}\` has been reloaded!`)
}

View file

@ -1,30 +0,0 @@
exports.conf = {
enabled: true,
guildOnly: false,
aliases: [],
permLevel: 'Developer',
requiredPerms: [],
cooldown: 2000
}
exports.help = {
name: 'restart',
category: 'Developer',
description: 'Restarts the bot.',
usage: 'restart',
parameters: ''
}
exports.run = async (client, message) => { // eslint-disable-line no-unused-vars
// This actually shuts down the bot, you'll need to use something like pm2 to get it to restart
await message.channel.send('<:reboot:467216876938985482> Restarting...')
/*
client.commands.forEach( async cmd => {
await client.unloadCommand(cmd);
});
*/
process.exit(1)
}

View file

@ -1,25 +0,0 @@
// Copyright 2020 Emily J. / mudkipscience and contributors. Subject to the AGPLv3 license.
exports.conf = {
enabled: true,
guildOnly: true,
aliases: [],
permLevel: 'User',
requiredPerms: [],
cooldown: 2000
}
exports.help = {
name: 'skip',
category: 'Music',
description: 'Force skips currently playing song.',
usage: 'skip',
params: ''
}
const { skip } = require('../utils/music')
exports.run = async (client, message, args, level, data) => {
skip(message.guild, 'skip')
message.reply('<:success:466995111885144095> Song skipped.')
}

View file

@ -1,22 +0,0 @@
// Copyright 2020 Emily J. / mudkipscience and contributors. Subject to the AGPLv3 license.
exports.conf = {
enabled: true,
guildOnly: false,
aliases: [],
permLevel: 'User',
requiredPerms: [],
cooldown: 2000
}
exports.help = {
name: 'support',
category: 'Bot',
description: 'Sends a link to my support/development server.',
usage: 'support',
parameters: ''
}
exports.run = async (client, message, args, level, data) => {
message.channel.send('Here you go! Hopefully we can help you here :3 https://discord.gg/HCF8mdv')
}

View file

@ -1,45 +0,0 @@
// Copyright 2020 Emily J. / mudkipscience and contributors. Subject to the AGPLv3 license.
exports.conf = {
enabled: true,
guildOnly: true,
aliases: ['vol'],
permLevel: 'User',
requiredPerms: [],
cooldown: 2000
}
exports.help = {
name: 'volume',
category: 'Music',
description: 'Sets volume of currently playing music. (100% = 25% of the actual volume)',
usage: 'volume [volume]',
parameters: '[volume] - Target volume from 0-100%'
}
const { setVolume } = require('../utils/music')
exports.run = async (client, message, args, level, data) => {
let userVolume
if (args[0].includes('%')) {
userVolume.replace('%', '')
}
userVolume = +userVolume
if (isNaN(userVolume) === true) {
return message.channel.send('<:error:466995152976871434> Input must be a number!')
}
if (userVolume) {
userVolume = Number(userVolume)
userVolume = userVolume / 100 * 0.25
if (userVolume <= 1) {
setVolume(message.guild, userVolume)
message.reply('<:success:466995111885144095> Set volume to ' + userVolume * 100 + '%')
}
}
}

View file

@ -1,103 +1,81 @@
const config = {
// Discord tokens
token: '',
devtoken: '',
// ID's
"owners": [], // Adding your ID here will give you access to dangerous commands like eval. Please be careful with who you add here! Eval can be used to modify the host machine.
// Bot name
botName: '',
// Host options
"devmodeEnabled": false, // true or false
"loggingServer": "", // server ID, or blank to disable
"startupLogs": "", // Channel ID, or blank to disable
"consoleLogs": "", // Channel ID, or blank to disable
// Auto-update from git (WIP)
autoUpdate: {
enabled: false, // enable auto-update
branch: 'next', // git branch
autoFetch: false, // check if an update is available and automatically restart and update
fetchInterval: 60000 // auto-fetch interval in milliseconds
},
// API keys that are required for some features/commands
keys: {
dbl: '', // top.gg key
sentry: '' // sentry.io dsn
},
// Tokens
"token": "", // Your bot's token.
"devtoken": "", // (optional) another token, meant for a bot used for development
"dblkey": "", // (optional) top.gg key, sends bot statistics to top.gg. You do not need this.
"sentry": "",
"server": "",
// Configurable API endpoints
endpoints: {
invidious: 'https://invidious.snopyta.org/api/'
invidious: ''
},
// Users added to this embed get access to developer-level commands
devs: [''],
// ID for the support server and the various channels Woomy logs to (leave blank if not used)
support: {
id: '',
logs: '',
startupLogs: '',
serverLogs: ''
// Default per-server settings
"defaultSettings" : {
"prefix": "~",
"devprefix": "!",
"modRole": "None set",
"adminRole": "None set",
"mutedRole": "None set",
"autorole": "off",
"welcomeChannel": "off",
"welcomeMessage": "off",
"leaveMessage": "off",
"chatlogsChannel": "off",
"modlogsChannel": "off",
"raidMode": "off",
"raidModeStrict": "off",
"blacklisted": "ARRAY",
"botChannels": "ARRAY",
"AFK": "ARRAY",
"SAR": "ARRAY",
"customCommands": "ARRAY",
},
// URL of MongoDB database
mongoDB: 'mongodb://localhost:27017/woomy',
// Default prefix Woomy uses
defaultPrefix: '~',
// Emojis used by Woomy
emojis: {
success: '',
error: '',
denied: '',
search: '',
crown: '',
boost: '',
bot: '',
status: {
online: '',
idle: '',
dnd: '',
offline: ''
}
},
// Permission levels
// Perm levels
permLevels: [
{
level: 0,
name: 'User',
{ level: 0,
name: "User",
check: () => true
},
{
level: 1,
name: 'Moderator',
{ level: 1,
name: "Moderator",
check: (message) => {
try {
if (message.member.roles.cache.has(message.settings.modRole)) return true
if (message.member.roles.cache.has(message.settings.modRole)) return true;
} catch (e) {
return false
return false;
}
}
},
{
level: 2,
name: 'Administrator',
{ level: 2,
name: "Administrator",
check: (message) => {
try {
if (message.member.roles.cache.has(message.settings.adminRole) || message.member.permissions.has('ADMINISTRATOR')) return true
if (message.member.roles.cache.has(message.settings.adminRole) || message.member.permissions.has("ADMINISTRATOR")) return true;
} catch (e) {
return false
return false;
}
}
},
{
level: 3,
name: 'Server Owner',
check: (message) => message.channel.type === 'text' ? (message.guild.ownerID === message.author.id) : false
}
{ level: 3,
name: "Server Owner",
check: (message) => message.channel.type === "text" ? (message.guild.ownerID === message.author.id ? true : false) : false
},
]
}
};
module.exports = config
module.exports = config;

View file

@ -1,5 +0,0 @@
// Copyright 2020 Emily J. / mudkipscience and contributors. Subject to the AGPLv3 license.
module.exports = (client) => {
client.logger.warn('Lost connection to Discord.')
}

View file

@ -1,5 +0,0 @@
// Copyright 2020 Emily J. / mudkipscience and contributors. Subject to the AGPLv3 license.
module.exports = async (client, error) => {
client.logger.error(JSON.stringify(error.stack))
}

View file

@ -1,22 +0,0 @@
// Copyright 2020 Emily J. / mudkipscience and contributors. Subject to the AGPLv3 license.
const Discord = require('discord.js')
module.exports = async (client, guild) => {
client.logger.info('Guild joined.')
// Create DB entry for newly joined guild
try {
await client.findOrCreateGuild(guild)
} catch (err) {
client.logger.error('Failed to create DB entry for newly joined guild: ' + err)
}
if (client.devmode === false) {
const channel = client.channels.cache.get(client.config.support.serverLogs)
// check if has perms, channel exists
const embed = new Discord.MessageEmbed()
embed.setColor('#F38159')
embed.setDescription(`Joined a new server with \`${guild.members.cache.size}\` members! I'm now in \`${client.guilds.cache.size}\` servers.`)
channel.send(embed)
}
}

View file

@ -1,23 +0,0 @@
// Copyright 2020 Emily J. / mudkipscience and contributors. Subject to the AGPLv3 license.
const Discord = require('discord.js')
module.exports = async (client, guild) => {
if (!guild.available) return
client.logger.info('Guild left.')
// Delete this guild's data from our database
try {
await client.deleteGuild(guild)
} catch (err) {
client.logger.error('Failed to delete DB entry for guild: ' + err)
}
if (client.devmode === false) {
const channel = client.channels.cache.get(client.config.support.serverLogs)
const embed = new Discord.MessageEmbed()
embed.setColor('#9494FF')
embed.setDescription(`Left a server. I'm now in \`${client.guilds.cache.size}\` servers.`)
channel.send(embed)
}
}

View file

@ -1,126 +0,0 @@
// Copyright 2020 Emily J. / mudkipscience and contributors. Subject to the AGPLv3 license.
module.exports = async (client, message) => {
if (message.author.bot) return
const data = {}
data.user = await client.findOrCreateUser(message.author)
const prefixes = [data.user.prefix]
if (message.guild) {
data.guild = await client.findOrCreateGuild(message.guild)
prefixes.push(data.guild.prefix)
}
prefixes.push(`<@${client.user.id}> `, `<@!${client.user.id}> `)
let prefix
for (const thisPrefix of prefixes) {
if (message.content.startsWith(thisPrefix)) prefix = thisPrefix
}
if (message.content.indexOf(prefix) !== 0) return
if (prefix === `<@${client.user.id}> ` || prefix === `<@!${client.user.id}> `) {
message.prefix = '@Woomy '
} else {
message.prefix = prefix
}
const args = message.content.slice(prefix.length).trim().split(/ +/g)
const command = args.shift().toLowerCase()
if (message.guild && !message.member) await message.guild.fetchMember(message.author)
const level = client.permlevel(message, data.guildSettings)
const cmd = client.commands.get(command) || client.commands.get(client.aliases.get(command))
if (!cmd) return
if (message.guild) {
if (!message.channel.permissionsFor(client.user).has('SEND_MESSAGES')) {
try {
return message.author.send(`I don't have permission to speak in \`#${message.channel.name}\`, Please ask a moderator to give me the send messages permission!`)
} catch (err) {}
}
if (data.guild.disabledCommands.includes(cmd.help.name)) {
if (data.guild.systemNotice.enabled === true) {
return message.channel.send('This command has been disabled in this server.')
}
}
if (data.guild.disabledCategories.includes(cmd.help.category)) {
if (data.guild.systemNotice.enabled === true) {
return message.channel.send('This category has been disabled in this server.')
}
}
}
if (!cmd.conf.enabled) {
if (data.guild.systemNotice.enabled === true) {
return message.channel.send('This command has been disabled by my developers.')
} else {
return
}
}
if (cmd && !message.guild && cmd.conf.guildOnly) {
return message.channel.send('This command is unavailable in direct messages! Please run this command in a server.')
}
if (message.guild) {
var missing = cmd.conf.requiredPerms.filter(p => !message.channel.permissionsFor(client.user).has(p))
if (missing.length > 0) {
missing = '`' + (missing.join('`, `')) + '`'
return message.channel.send(`Missing permissions: ${missing}`)
}
}
// Dev perm level is separate so dev's don't get owner perms where they shouldn't have them
if (cmd.conf.permLevel === 'Developer') {
if (!client.config.devs.includes(message.author.id)) {
if (data.guild.systemNotice.enabled === true) {
return message.channel.send('You don\'t have permission to run this command!')
} else {
return
}
}
}
if (level < client.levelCache[cmd.conf.permLevel]) {
if (data.guild.systemNotice.enabled === true) {
return message.channel.send('You don\'t have permission to run this command!')
} else {
return
}
}
// Cooldown
if (client.cooldown.get(cmd.help.name).has(message.author.id)) {
const init = client.cooldown.get(command).get(message.author.id)
const curr = new Date()
const diff = Math.round((curr - init) / 1000)
const time = cmd.conf.cooldown / 1000
return message.reply(`this command is on cooldown! You'll be able to use it again in ${time - diff} seconds.`)
} else {
client.cooldown.get(cmd.help.name).set(message.author.id, new Date())
setTimeout(() => {
client.cooldown.get(cmd.help.name).delete(message.author.id)
}, client.commands.get(cmd.help.name).conf.cooldown)
}
message.author.permLevel = level
message.flags = []
while (args[0] && args[0][0] === '-') {
message.flags.push(args.shift().slice(1))
}
client.logger.cmd(`Command ran: ${cmd.help.name}`)
cmd.run(client, message, args, level, data)
}

View file

@ -1,29 +0,0 @@
// Copyright 2020 Emily J. / mudkipscience and contributors. Subject to the AGPLv3 license.
const moment = require('moment')
module.exports = (client) => {
const timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
const activities = client.commands.keyArray()
let activity = activities.random()
client.user.setActivity(`${client.config.defaultPrefix + activity} | v${client.version.number}`, { type: 'PLAYING' })
setInterval(() => {
activity = activities.random()
if (client.lockActivity === false) {
client.user.setActivity(`${client.config.defaultPrefix + activity} | v${client.version.number}`, { type: 'PLAYING' })
};
}, 20000)
// REMOVE ! IN FRONT OF CLIENT.CONFIG.SUPPORT.ID WHEN DEVMODE WORKS
if (!client.config.support.id && client.config.support.startupLogs && client.devmode === false) {
try {
const guild = client.guilds.cache.get(client.config.support.id)
const channel = guild.channels.cache.get(client.config.support.startupLogs)
channel.send(`Bot started at \`${timestamp}\``)
} catch (err) {}
}
client.logger.ready('Connected to Discord as ' + client.user.tag)
}

View file

@ -1,5 +0,0 @@
// Copyright 2020 Emily J. / mudkipscience and contributors. Subject to the AGPLv3 license.
module.exports = (client) => {
client.logger.info('Reconnecting to Discord...')
}

198
index.js
View file

@ -1,122 +1,112 @@
// Copyright 2020 Emily J. / mudkipscience and contributors. Subject to the AGPLv3 license.
if (Number(process.version.slice(1).split(".")[0]) < 12) {
throw new Error("Node 12.0.0 or higher is required. Please update Node on your system.");
};
'use strict'
const Discord = require('discord.js');
const { promisify } = require('util');
const readdir = promisify(require('fs').readdir);
const Enmap = require('enmap');
const sentry = require('@sentry/node');
const chalk = require('chalk');
const client = new Discord.Client({ ws: { intents: [
'GUILDS',
'GUILD_MEMBERS',
'GUILD_EMOJIS',
'GUILD_VOICE_STATES',
'GUILD_MESSAGES',
'DIRECT_MESSAGES',
'GUILD_MESSAGE_REACTIONS',
]}});
// remove this after we uncomment sentry
/* eslint-disable no-unused-vars */
try {
client.config = require('./config');
} catch (err) {
console.log('Failed to load config.js:', err);
process.exit();
};
// Check node.js version
if (Number(process.version.slice(1).split('.')[0]) < 12) {
console.log('NodeJS 12.0.0 or higher is required. Please update NodeJS on your system.')
process.exit()
}
try{
client.version = require('./version.json');
} catch (err) {
console.log('Failed to load version.json:', err);
process.exit();
};
// Libraries
const Discord = require('discord.js')
const fs = require('fs')
const isDocker = require('is-docker')
const sentry = require('@sentry/node')
try{
client.logger = require('./src/modules/Logger');
} catch (err) {
console.log('Failed to load Logger.js:', err);
process.exit();
};
// Create bot client instance
const client = new Discord.Client({ disabledEvents: ['TYPING_START'] })
client.logger.setClient(client);
// Load all our useful utilities
client.configTemplate = require('./configTemplate')
client.config = require('./config')
client.version = require('./version.json')
client.db = require('./utils/mongoose')
client.logger = require('./utils/logger')
require('./utils/_functions')(client)
try{
require("./src/modules/functions")(client);
} catch (err) {
console.log('Failed to load functions.js:', err);
process.exit();
};
// Set missing values in config from config template
for (const c in client.configTemplate) {
if (typeof client.config[c] === 'undefined') {
client.logger.warn('Config value missing: ' + String(c))
client.config[c] = client.configTemplate[c]
}
}
if (typeof client.config.devmode !== 'undefined') { // Check if devmode is explicitly overridden
client.devmode = client.config.devmode
} else { // Check if Woomy is running inside a Docker container
if (isDocker() === false) {
client.devmode = true
if(client.config.devmodeEnabled == true && process.env['USER'] != 'container') {
client.devmode = true;
} else {
client.devmode = false
}
}
client.devmode = false;
if(client.config.dblkey.length > 0) {
const DBL = require("dblapi.js");
const dblapi = new DBL(client.config.dblkey, client);
};
if (client.devmode) {
client.logger.warn('Running in development mode.')
}
if(client.config.sentry.length > 0) {
sentry.init({ dsn: client.config.sentry });
};
};
// Create caches for permissions, commands, cooldowns and aliases
client.levelCache = {}
client.commands = new Discord.Collection()
client.cooldown = new Discord.Collection()
client.aliases = new Discord.Collection()
client.commands = new Enmap();
client.aliases = new Enmap();
client.settings = new Enmap({name: 'settings'});
// Main initialisation function
const init = async () => {
// initialise sentry
if (client.config.keys.sentry !== '' && client.devmode === false) {
// sentry.init({ dsn: client.config.keys.sentry })
}
const cmdFiles = await readdir("./src/commands/");
client.logger.info(`Loading ${cmdFiles.length} commands.`);
cmdFiles.forEach(file => {
if (!file.endsWith(".js")) {
return;
};
const response = client.loadCommand(file);
if (response) {
console.log(response);
};
});
// Command handler
fs.readdir('./commands', (err, files) => {
if (err) {
client.logger.error('Failed to get files in commands directory: ' + err)
process.exit()
}
client.logger.info(`Loading ${files.length} commands.`)
files.forEach(file => {
if (!file.endsWith('.js')) {
return
}
const res = client.loadCommand(file)
if (res) {
client.logger.error(res)
}
})
})
const evtFiles = await readdir("./src/events/");
client.logger.info(`Loading ${evtFiles.length} events.`);
evtFiles.forEach(file => {
if (!file.endsWith(".js")) {
return;
};
const eventName = file.split(".")[0];
const event = require(`./src/events/${file}`);
client.on(eventName, event.bind(null, client));
});
// Event handler
fs.readdir('./events', (err, files) => {
if (err) {
client.logger.error('Failed to get files in events directory: ' + err)
process.exit()
}
client.logger.info(`Loading ${files.length} events.`)
files.forEach(file => {
if (!file.endsWith('.js')) {
return
}
const event = require(`./events/${file}`)
client.on(file.substr(0, file.length - 3), event.bind(null, client))
})
})
// Cache client permissions
client.levelCache = {};
for (let i = 0; i < client.config.permLevels.length; i++) {
const thisLevel = client.config.permLevels[i]
client.levelCache[thisLevel.name] = thisLevel.level
}
const thisLevel = client.config.permLevels[i];
client.levelCache[thisLevel.name] = thisLevel.level;
};
// Initialise DB
await client.db.init(client)
// Login to Discord
function failedToLogin (err) {
client.logger.error('Couldn\'t login: ' + err)
process.exit(0)
}
if (client.devmode !== true) {
client.login(client.config.token).catch(failedToLogin)
if(client.devmode === true) {
client.login(client.config.devtoken);
} else {
client.login(client.config.devtoken).catch(failedToLogin)
}
}
client.login(client.config.token);
};
};
init()
process.on('SIGINT', function(){
client.logger.info("Disconnecting...")
client.destroy();
process.exit();
});
init();

View file

@ -1,98 +0,0 @@
const { Schema, model } = require('mongoose')
const { defaultPrefix } = require('../config')
module.exports = model('Guild', new Schema({
_id: Schema.Types.ObjectId,
guildID: String,
prefix: {
type: String,
default: defaultPrefix
},
modRole: {
type: String,
default: null
},
adminRole: {
type: String,
default: null
},
mutedRole: {
type: String,
default: null
},
autoRole: {
type: String,
default: null
},
systemNotice: {
type: Object,
default: {
enabled: true,
autoDelete: 0
}
},
music: {
type: Object,
default: {
defaultVolume: 0.25
}
},
plugins: {
type: Object,
default: {
welcome: {
enabled: false,
channel: null,
message: null
},
goodbye: {
enabled: false,
channel: null,
message: null
},
chatLogs: {
enabled: false,
channel: null
},
modLogs: {
enabled: false,
channel: null
}
}
},
botChannels: {
type: Array,
default: []
},
blacklisted: {
type: Array,
default: []
},
customCommands: {
type: Array,
default: []
},
disabledCommands: {
type: Array,
default: []
},
disabledCategories: {
type: Array,
default: []
}
}))
// I SPWENT TWO FUCKONG DAUYS TRYING TO FIGURE OUT HOW TO UPDATE EXISTING DB ENTRIES WITH NEW SCHEMA SHIT AND IT DOES THIS BY FUCKING DEFAULT

View file

@ -1,8 +0,0 @@
const { Schema, model } = require('mongoose')
module.exports = model('Member', new Schema({
_id: Schema.Types.ObjectId,
userID: String
// Will chuck in some stuff like timed mutes, warning system, levelling, etc
}))

View file

@ -1,28 +0,0 @@
const { Schema, model } = require('mongoose')
const { defaultPrefix } = require('../config')
module.exports = model('User', new Schema({
_id: Schema.Types.ObjectId,
userID: String,
prefix: {
type: String,
default: defaultPrefix
},
profile: {
type: Object,
default: {
bio: 'I should run ~setbio :P',
birthdate: null,
pronouns: null,
favColour: null
}
},
// polyamory uwu
marriages: {
type: Array,
default: []
}
}))

3436
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -1,29 +1,30 @@
{
"name": "woomy",
"version": "2.0.0",
"description": "uwu",
"version": "1.2.3",
"description": "Woomy is a all-purpose discord bot built off the guidebot base and coded in node.js using discord.js.",
"main": "index.js",
"dependencies": {
"@discordjs/opus": "^0.1.0",
"@sentry/node": "^5.15.4",
"colors": "^1.4.0",
"discord.js": "^12.2.0",
"@discordjs/opus": "^0.6.0",
"@sentry/node": "^6.12.0",
"better-sqlite3": "^7.4.0",
"chalk": "^4.1.1",
"dblapi.js": "^2.4.1",
"discord-paginator.js": "git+https://gitdab.com/embee/discord-paginator.js",
"discord.js": "^12.5.3",
"enmap": "^5.8.5",
"ffmpeg-static": "^4.3.0",
"hastebin-gen": "^2.0.5",
"is-docker": "^2.0.0",
"moment": "^2.24.0",
"mongoose": "^5.9.9",
"node-fetch": "^2.6.0",
"prism-media": "^1.2.1",
"tracer": "^1.0.3",
"ytdl-core-discord": "^1.2.0"
},
"devDependencies": {
"eslint": "^6.8.0",
"eslint-config-standard": "^14.1.1",
"eslint-plugin-import": "^2.20.2",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^4.0.1"
"moment": "^2.29.1",
"moment-duration-format": "^2.3.2",
"nekos.life": "^2.0.5",
"node-fetch": "^2.6.1",
"pretty-ms": "^7.0.1",
"randomcolor": "^0.6.2",
"relevant-urban": "^2.0.0",
"to-zalgo": "^1.0.1",
"urban": "^0.3.2",
"weather-js": "^2.0.0",
"ytdl-core": "^4.9.1"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
@ -33,7 +34,7 @@
"url": "git+https://github.com/mudkipscience/woomy.git"
},
"author": "mudkipscience",
"license": "GPL-3.0",
"license": "MIT",
"bugs": {
"url": "https://github.com/mudkipscience/woomy/issues"
},

View file

Before

Width:  |  Height:  |  Size: 99 KiB

After

Width:  |  Height:  |  Size: 99 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Before After
Before After

View file

@ -0,0 +1,21 @@
{
"coolPeople": [
"448354605617643520",
"433790467830972417",
"231777839576252417",
"285992938314661899",
"231704701433937931",
"324937993972350976",
"336492042299637771",
"273867501006225419",
"331870539897372672",
"304000458144481280",
"239787232666451980",
"264970229514371072",
"254310746450690048",
"358390849807319040",
"211011138656272386",
"266472557740425216",
"102943767346057216"
]
}

View file

@ -15,19 +15,19 @@
"If I'm not back again this time tomorrow",
"Carry on, carry on as if nothing really matters",
"Too late, my time has come",
"sends shivers down my spine, body's aching all the time",
"Sends shivers down my spine, body's aching all the time",
"Goodbye, everybody, I've got to go",
"Gotta leave you all behind and face the truth",
"Mama, ooh, (Anyway the wind blows)",
"I don't wanna die",
"I sometimes wish I'd never been born at all",
"i see a little silhouetto of a man",
"I see a little silhouetto of a man",
"Scaramouche! Scaramouche! will you do the Fandango?",
"Thunderbolt and lightning, very, very fright'ning me",
"(Galileo) Galileo, (Galileo) Galileo, Galileo Figaro magnifico",
"I'm just a poor boy, nobody loves me",
"He's just a poor boy from a poor family",
"spare him his life from this monstrosity",
"Spare him his life from this monstrosity",
"Easy come, easy go, will you not let me go?",
"Bismillah! No, we will not let you go",
"(Let him go!) Bismillah! We will not let you go",
@ -35,17 +35,17 @@
"(Let me go) Will not let you go",
"(Let me go) Will not let you go",
"(Let me go) Ah",
"no, no, no, no, no, no, no",
"No, no, no, no, no, no, no",
"(Oh mamma mia, mamma mia) Mamma mia, let me go",
"Beelzebub has the devil put aside for me, for me, for me!",
"So you think you can stone me and spit in my eye?",
"so you think you can love me and leave me to die?",
"So you think you can love me and leave me to die?",
"Oh baby, can't do this to me, baby!",
"Just gotta get out, just gotta get right outta here!",
"Nothing really matters, anyone can see",
"nothing really matters",
"Nothing really matters",
"Nothing really matters, to me",
"any way the wind blows"
"Any way the wind blows"
],
"creeper": [

View file

@ -0,0 +1,102 @@
{
"aesthetic attraction": {
"name": "aesthetic attraction",
"description": "Getting pleasure from the appearance of a specific individual like you would from watching beautiful scenery."
},
"platonic attraction": {
"name": "platonic attraction",
"description": "A desire to have a platonic relationship or friendship with a specific individual."
},
"romantic attraction": {
"name": "romantic attraction",
"description": "A desire to have a romantic relationship with a specific individual."
},
"sensual attraction": {
"name": "sensual attraction",
"description": "A desire for physical intimacy with a specific individual. Cuddling, hand holding, etc."
},
"sexual attraction": {
"name": "sexual attraction",
"description": "A desire for sexual contact with a specific individual."
},
"abrosexual": {
"name": "abrosexual",
"description": "Someone whose sexuality changes frequently. They experience different sexualities over time."
},
"androgynosexual": {
"name": "androgynosexual",
"description": "Someone who is attracted to both men and women, particularly those who are androgynous in appearance."
},
"androsexual": {
"name": "androsexual",
"description": "Someone who is attracted to men and/or masculine people."
},
"aromantic": {
"name": "aromantic",
"description": "Someone who does not experience romantic attraction. They do not have to also be asexual however as they may still experience other types of attraction."
},
"asexual": {
"name": "asexual",
"description": "Someone who feels little to no sexual attraction to anyone."
},
"bisexual": {
"name": "bisexual",
"description": "Someone who is attracted to more than one gender."
},
"ceterosexual": {
"name": "ceterosexual",
"description": "Someone who is attracted to non-binary people."
},
"demisexual": {
"name": "demisexual",
"description": "Someone who doesn't experience sexual/romantic attraction towards someone until they form an emotional connection."
},
"finsexual": {
"name": "finsexual",
"description": "Someone who is attracted to women and/or feminine people."
},
"gay": {
"name": "gay",
"description": "Someone who is homosexual (attracted to ones own gender)"
},
"gynosexual": {
"name": "gynosexual",
"description": "Someone who as attracted to women and/or feminity."
},
"grey-romantic": {
"name": "grey-romantic",
"description": "Someone with a romantic orentiation that is somewhere between aromantic and romantic."
},
"heterosexual": {
"name": "heterosexual",
"description": "Someone who is attracted to people of the opposite gender."
},
"homosexual": {
"name": "homosexual",
"description": "Someone attracted to people of ones own gender."
},
"lesbian": {
"name": "lesbian",
"description": "A woman who is attracted to other women."
},
"omnisexual": {
"name": "omnisexual",
"description": "Someone who is attracted to all genders."
},
"pansexual": {
"name": "pansexual",
"description": "Someone who is attracted towards people regardless of their gender identity."
},
"pomosexual": {
"name": "pomosexual",
"description": "Someone who does not fit into any sexual orientation label."
},
"polysexual": {
"name": "polysexual",
"description": "Someone who is attracted to some, but not all genders."
},
"straight": {
"name": "straight",
"description": "Someone who is heterosexual (attracted to people of the opposite gender)"
}
}

38
src/commands/8ball.js Normal file
View file

@ -0,0 +1,38 @@
exports.run = async (client, message, args) => {
if (!args[0])
return message.channel.send(
`<:error:466995152976871434> You did not ask me a question. Usage: \`${client.commands.get(`8ball`).help.usage}\``
);
var ball = [
"No darndested clue.",
"Stupid question. You should be ashamed of yourself for even asking.",
"Yes!",
"Not in your wildest dreams!",
"No chance.",
"Never.",
"Just Google it.",
"¯\\_(ツ)_/¯",
"Possibly.",
"There's a high chance.",
"I'd rather not say."
];
let mess = ball.random();
message.channel.send(":8ball: " + mess);
};
exports.conf = {
enabled: true,
guildOnly: false,
aliases: [],
permLevel: "User",
requiredPerms: []
};
exports.help = {
name: "8ball",
category: "Fun",
description: "Consult the 8ball for advice.",
usage: "8ball [question]"
};

58
src/commands/about.js Normal file
View file

@ -0,0 +1,58 @@
const { version } = require("discord.js");
const moment = require("moment");
require("moment-duration-format");
exports.run = (client, message) => {
const duration = moment
.duration(client.uptime)
.format(" D [days], H [hrs], m [mins], s [secs]");
var mud = client.users.cache.get(client.config.owners[0]).tag;
var flgx = client.users.cache.get(client.config.owners[1]).tag;
var build;
var prefix;
if(message.guild) {
prefix = message.settings.prefix;
} else {
prefix = client.config.defaultSettings.prefix;
};
if(client.devmode == true) {
build = "development"
} else {
build = "production"
}
embed = new Discord.MessageEmbed();
embed.setColor(client.embedColour(message));
embed.setThumbnail(client.user.avatarURL({format: "png", dynamic: true, size: 2048}))
embed.setTitle("About Woomy")
embed.addField(
"General:", `• users: \`${client.users.cache.size}\`\n• channels: \`${client.channels.cache.size}\`\n• servers: \`${client.guilds.cache.size}\`\n• commands: \`${client.commands.size}\`\n• uptime: \`${duration}\``,true
);
embed.addField(
`Technical:`, `• RAM Usage: \`${(process.memoryUsage().heapUsed / 1024 / 1024).toFixed(2)} MB\`\n• OS: \`${require("os").type}\`\n• bot version: \`${client.version.number} (${build})\`\n• discord.js version: \`v${version}\`\n• node.js version: \`${process.version}\``,true
);
embed.addField(
"Links:", "[Support](https://discord.gg/HCF8mdv) | [GitHub](https://github.com/mudkipscience/woomy) | [db.org](https://discordbots.org/bot/435961704145485835/vote) | [BFD](https://botsfordiscord.com/bots/435961704145485835/vote) | [top.gg](https://discordbotlist.com/bots/435961704145485835) | [discord.js](https://discord.js.org/#/) | [guidebot](https://github.com/AnIdiotsGuide/guidebot/)"
);
message.channel.send(embed);
};
exports.conf = {
enabled: true,
guildOnly: false,
aliases: ["stats", "botinfo"],
permLevel: "User",
requiredPerms: []
};
exports.help = {
name: "about",
category: "Utility",
description: "Information about the bot, as well as a couple of helpful links",
usage: "about"
};

View file

@ -0,0 +1,41 @@
Discord = require("discord.js");
const url = "https://www.minecraftskinstealer.com/achievement/a.php";
exports.run = (client, message, args) => {
let text = args.join(" ");
if (!text) {
return message.channel.send(
`<:error:466995152976871434> No text provided to turn into an achievement. Usage: \`${client.commands.get(`achievement`).help.usage}\``
);
};
message.channel.startTyping();
let params = "h=Achievement+Get%21&i=1&t=" + encodeURIComponent(text);
try {
message.channel.stopTyping();
message.channel.send({
files: [new Discord.MessageAttachment(url + "?" + params, "achievement.png")]
});
} catch(err) {
message.channel.stopTyping();
message.channel.send(`<:error:466995152976871434> Error when generating image: \`${err}\``)
}
};
exports.conf = {
enabled: true,
guildOnly: false,
aliases: [],
permLevel: "User",
requiredPerms: ["ATTACH_FILES"]
};
exports.help = {
name: "achievement",
category: "Fun",
description: "Generates an minecraft achievement.",
usage: "achievement [text]"
};

45
src/commands/activity.js Normal file
View file

@ -0,0 +1,45 @@
exports.run = (client, message, args) => {
if(!args[0]) {
return message.channel.send(`<:error:466995152976871434> No arguments! Usage: \`${client.commands.get(`activity`).help.usage}\``)
}
if(client.lockActivity == true) {
activityLocked = "locked";
} else {
activityLocked = "unlocked";
}
if(args[0] == "lock" && !args[1]) {
client.lockActivity = true;
return message.channel.send(
"<:success:466995111885144095> Activity has been locked will no longer change automatically."
);
};
if(args[0] == "unlock" && !args[1]) {
client.lockActivity = false;
return message.channel.send(
"<:success:466995111885144095> Activity has been unlocked and will begin changing automatically."
);
};
client.lockActivity = true;
client.user.setActivity(args.join(" "));
message.channel.send(
`<:success:466995111885144095> Activity locked and changed to \`${args.join(" ")}\`
`);
};
exports.conf = {
enabled: true,
guildOnly: false,
aliases: [],
permLevel: "Developer",
requiredPerms: []
};
exports.help = {
name: "activity",
category: "Owner",
description: "Changes the bot's activity and disables automatic changing of the activity",
usage: "activity [activity] **OR** activity [lock/unlock]"
};

61
src/commands/adminrole.js Normal file
View file

@ -0,0 +1,61 @@
exports.run = async (client, message, args) => {
const settings = message.settings;
if (!client.settings.has(message.guild.id)) {
client.settings.set(message.guild.id, {});
}
var adminRole = message.guild.roles.cache.get(settings.adminRole)
if (!args[0]) {
if(!adminRole) {
return message.channel.send(
`<:error:466995152976871434> There is no admin role set for this server. Please set one using \`${message.settings.prefix}adminrole <role>\``
);
} else {
message.channel.send(`The current admin role is: \`${adminRole.name}\``)
}
} else {
const joinedValue = args.join(" ");
if (joinedValue.length < 1) {
return message.channel.send(
`<:error:466995152976871434> You didn't specify a role. Usage: \`${client.commands.get(`adminrole`).help.usage}\``
);
};
if (settings.adminRole != "None set" && joinedValue === adminRole.name) {
return message.channel.send(
"<:error:466995152976871434> The admin role is already set to that!"
);
};
let role = client.findRole(joinedValue, message);
if (!role) {
return message.channel.send(`<:error:466995152976871434> That role doesn't seem to exist. Try again!`);
};
client.settings.set(message.guild.id, role.id, "adminRole");
message.channel.send(
`<:success:466995111885144095> The admin role has been set to \`${role.name}\`
`);
};
};
exports.conf = {
enabled: true,
guildOnly: true,
aliases: [],
permLevel: "Server Owner",
requiredPerms: []
};
exports.help = {
name: "adminrole",
category: "Configure",
description: "Sets the admin role for this server.",
usage: "adminrole [role]"
};

69
src/commands/autorole.js Normal file
View file

@ -0,0 +1,69 @@
exports.run = async (client, message, args) => {
const settings = message.settings;
if (!client.settings.has(message.guild.id)) {
client.settings.set(message.guild.id, {});
}
var autorole = message.guild.roles.cache.get(settings.autorole)
if (!args[0]) {
if(!autorole) {
return message.channel.send(
`<:error:466995152976871434> There is no autorole set for this server. Please set one using \`${message.settings.prefix}autorole <role>\``
);
} else {
message.channel.send(`Users recieve this role upon joining: \`${autorole.name}\``)
}
} else if(args.join(" ").toLowerCase() == "off") {
if(settings.autorole == "off") {
return message.channel.send("<:error:466995152976871434> Autoroling has not been enabled.")
}
client.settings.set(message.guild.id, "off", "autorole");
return message.channel.send("<:success:466995111885144095> Autoroling has been disabled.")
} else {
const joinedValue = args.join(" ");
if (joinedValue.length < 1) {
return message.channel.send(
`<:error:466995152976871434> You didn't specify a role. Usage: \`${client.commands.get(`autorole`).help.usage}\``
);
};
if (settings.autorole != "off" && joinedValue === autorole.name) {
return message.channel.send(
"<:error:466995152976871434> The autorole is already set to that!"
);
};
role = client.findRole(joinedValue, message);
if (!role) {
return message.channel.send(`<:error:466995152976871434> That role doesn't seem to exist. Try again!`);
};
client.settings.set(message.guild.id, role.id, "autorole");
message.channel.send(
`<:success:466995111885144095> The autorole has been set to \`${role.name}\`
`);
};
};
exports.conf = {
enabled: true,
guildOnly: true,
aliases: [],
permLevel: "Administrator",
requiredPerms: ["MANAGE_ROLES"]
};
exports.help = {
name: "autorole",
category: "Configure",
description: "Sets the autorole for this server.",
usage: "autorole <role> **OR** autorole off"
};

38
src/commands/avatar.js Normal file
View file

@ -0,0 +1,38 @@
exports.run = (client, message, args) => {
let user = message.mentions.users.first();
let users;
if (!args[0] || !message.guild) {
user = message.author;
};
if (!user && message.guild) {
users = client.searchForMembers(message.guild, args[0]);
if (users.length > 1) {
return message.channel.send(
"<:error:466995152976871434> Found multiple users, please be more specific or mention the user instead."
);
} else if (users.length == 0) {
return message.channel.send(
"<:error:466995152976871434> That user doesn't seem to exist, try again!"
);
};
user = users[0];
user = user.user;
}
message.channel.send(`**${user.tag}'s** avatar is: ${user.avatarURL({format: "png", dynamic: true, size: 2048})}`);
};
exports.conf = {
enabled: true,
guildOnly: false,
aliases: [],
permLevel: "User",
requiredPerms: ["EMBED_LINKS"]
};
exports.help = {
name: "avatar",
category: "Utility",
description: "Gives you the specified users avatar.",
usage: "avatar <user>"
};

87
src/commands/ban.js Normal file
View file

@ -0,0 +1,87 @@
exports.run = async (client, message, args) => {
const settings = (message.settings = client.getSettings(message.guild.id));
if(!args[0]) {
return message.channel.send(
`<:error:466995152976871434> No username provided. Usage: \`${client.commands.get(`ban`).help.usage}\``
);
};
let user = message.mentions.members.first();
if (!user) {
let users;
users = client.searchForMembers(message.guild, args[0]);
if (users.length > 1)
return message.channel.send(
"<:error:466995152976871434> Found multiple users! Please be more specific or mention the user instead."
);
else if (users.length == 0)
return message.channel.send(
"<:error:466995152976871434> That user doesn't seem to exist. Try again!"
);
user = users[0];
};
if (user.user.id === message.guild.owner.id) {
return message.channel.send("<:error:466995152976871434> You can't ban the owner!")
};
let moderator = message.guild.member(message.author)
if (user.roles.highest.position >= moderator.roles.highest.position && moderator.user.id !== message.guild.ownerID) {
return message.channel.send(
`<:error:466995152976871434> You can't ban people higher ranked than yourself!`
);
};
let bot = message.guild.member(client.user)
if (user.roles.highest.position >= bot.roles.highest.position) {
return message.channel.send(
`<:error:466995152976871434> I can't ban people who are higher ranked than me!`
);
};
if (!user.bannable)
return message.channel.send(
"<:error:466995152976871434> Specified user is not bannable."
);
let reason = args.slice(1).join(" ");
if (!reason) reason = `Banned by ${message.author.tag}`;
await message.guild.members.ban(user, {reason: reason}).catch(console.error);
message.channel.send(`<:success:466995111885144095> Banned \`${user.user.tag}\``);
if (settings.modlogsChannel !== "off") {
const channel = message.guild.channels.cache.find(
channel => channel.name === settings.modlogsChannel
);
if (channel) {
let embed = new Discord.MessageEmbed();
embed.setColor("#BC0057");
embed.setAuthor("User banned!", user.user.avatarURL({format: "png", dynamic: true, size: 2048}));
embed.setDescription(
`• User: ${user.user.tag} (${user.user.id})\n• Mod: ${message.author} (${message.author.id})\n• Reason: ${reason}`
);
try {
channel.send(embed);
} catch (err) {
// probably no permissions to send messages/embeds there
};
};
};
};
exports.conf = {
enabled: true,
guildOnly: true,
aliases: [],
permLevel: "Moderator",
requiredPerms: ["BAN_MEMBERS"]
};
exports.help = {
name: "ban",
category: "Moderation",
description: "Bans specified user.",
usage: "ban [user] <reason>"
};

124
src/commands/blocklist.js Normal file
View file

@ -0,0 +1,124 @@
exports.run = async (client, message, [action, ...member]) => {
const settings = message.settings;
if(settings.blacklisted == "ARRAY") {
await client.settings.set(message.guild.id, [], "blacklisted");
}
if(!action) {
return message.channel.send(
`<:error:466995152976871434> You didn't tell me if I was meant to add or remove someone from the blocklist! Usage: \`${client.commands.get(`blocklist`).help.usage}\``
)
}
member = member.join(" ")
if(!member) {
return message.channel.send(
`<:error:466995152976871434> You didn't tell me who to add to the blocklist! Usage: \`${client.commands.get(`blocklist`).help.usage}\``
);
};
let user = message.mentions.members.first();
if(action == "add") {
if (!user) {
let users;
users = client.searchForMembers(message.guild, member);
if (users.length > 1)
return message.channel.send(
"<:error:466995152976871434> Found multiple users! Please be more specific or mention the user instead."
);
else if (users.length == 0)
return message.channel.send(
"<:error:466995152976871434> That user doesn't seem to exist. Try again!"
);
user = users[0];
};
if(user.id === client.user.id) {
return message.channel.send('lol no');
};
if (user.id === message.guild.owner.id) {
return message.channel.send("<:error:466995152976871434> You can't add the owner to the blocklist!")
};
let admin = message.guild.member(message.author)
if (user.roles.highest.position >= admin.roles.highest.position && admin.user.id !== message.guild.ownerID) {
return message.channel.send(
`<:error:466995152976871434> You can't add people higher ranked than yourself to the blocklist!`
);
};
if(user.id === message.member.id) {
return message.channel.send('<:error:466995152976871434> You can\'t add yourself to the blocklist!');
};
let blacklisted = false;
if(settings.blacklisted.length > 0) {
settings.blacklisted.forEach(function(ID) {
if(ID == user.id) {
blacklisted = true;
}
});
if(blacklisted == true) {
return message.channel.send('<:error:466995152976871434> This person is already on the blocklist!');
};
};
client.settings.push(message.guild.id, user.id, "blacklisted")
return message.channel.send(`<:success:466995111885144095> Added \`${user.user.tag}\` to the blocklist.`)
};
if (action == "remove") {
if (!user) {
let users;
users = client.searchForMembers(message.guild, member);
if (users.length > 1)
return message.channel.send(
"<:error:466995152976871434> Found multiple users! Please be more specific or mention the user instead."
);
else if (users.length == 0)
return message.channel.send(
"<:error:466995152976871434> That user doesn't seem to exist. Try again!"
);
user = users[0];
};
let blacklisted = false;
settings.blacklisted.forEach(function(ID) {
if(ID == user.id) {
blacklisted = true;
}
});
if(blacklisted != true) {
return message.channel.send('<:error:466995152976871434> This user isn\'t on the blocklist!');
};
client.settings.remove(message.guild.id, user.id, "blacklisted")
return message.channel.send(`<:success:466995111885144095> Removed \`${user.user.tag}\` from the blocklist.`)
};
};
exports.conf = {
enabled: true,
guildOnly: true,
aliases: ['bl'],
permLevel: "Administrator",
requiredPerms: []
};
exports.help = {
name: "blocklist",
category: "Moderation",
description: "Allows you to configure Woomy's blocklist. Users on the blocklist cannot use commands.",
usage: "blocklist [add/remove] [member]"
};

View file

@ -0,0 +1,45 @@
const Discord = require("discord.js");
const lyric = require('../../resources/other/lyrics.json')
exports.run = async (client, message, args, level) => {
const lyrics = lyric.bohemian_rhapsody;
var runtop = true;
var runbottom = false;
for(var br = 0; br < lyrics.length; br++) {
{
if (runtop === true) {
var response = await client.awaitReply(message, lyrics[br]);
runbottom = false;
};
if (runbottom === true) {
if (response !== lyrics[br]) {
return message.channel.send("Those aren't the lyrics!");
}
runtop = false
};
};
if (runtop === true) {
runtop = false
runbottom = true
} else if (runbottom === true) {
runtop = true
runbottom = false
};
};
message.channel.send("What a lovely duet!");
};
exports.conf = {
enabled: true,
guildOnly: false,
aliases: ["br"],
permLevel: "User",
requiredPerms: []
};
exports.help = {
name: "bohemian_rhapsody",
category: "Fun",
description: "Queen karaoke",
usage: "bohemian_rhapsody"
};

46
src/commands/calculate.js Normal file
View file

@ -0,0 +1,46 @@
var allowed = ["+", "-", "*", "/", "(", ")", " "];
exports.run = (client, message, args) => {
let exercise = args.join(" ");
if (!exercise) {
return message.channel.send(
`<:error:466995152976871434> No equation provided. Usage :\`${client.commands.get(`calculate`).help.usage}\``
);
}
try {
for (var i = 0; i < exercise.length; i++) {
let c = exercise.charAt(i);
let found = allowed.find((element) => element === c);
if(c == "0") found = true;
if(!(Number(c) || found))
{
return message.channel.send(
`<:error:466995152976871434> Invalid equation. Please use \`*\` for multiplication and \`/\` for division!`
);
}
}
let result = (new Function( 'return ' + exercise )());
message.channel.send(`\`RESULT:\`\n\`\`\`${result}\`\`\``)
} catch (err) {
message.channel.send('<:error:466995152976871434> Malformed input.')
}
};
exports.conf = {
enabled: true,
guildOnly: false,
aliases: ["calc", "math"],
permLevel: "User",
requiredPerms: []
};
exports.help = {
name: "calculate",
category: "Utility",
description: "Solves basic mathematical equations.",
usage: "calculate [equation]"
};

30
src/commands/cat.js Normal file
View file

@ -0,0 +1,30 @@
const API = require('nekos.life');
const {sfw} = new API();
exports.run = async (client, message) => {
message.channel.startTyping();
try {
sfw.meow().then((json) => {
message.channel.send(json.url)
message.channel.stopTyping();
});
} catch (err) {
client.logger.error("cat.js: " + err);
message.channel.send(`<:error:466995152976871434> An error has occurred: ${err}`)
message.channel.stopTyping();
};
};
exports.conf = {
enabled: true,
guildOnly: false,
aliases: [],
permLevel: "User",
requiredPerms: ["EMBED_LINKS"]
};
exports.help = {
name: "cat",
category: "Image",
description: "Sends you cat pics.",
usage: "cat"
};

30
src/commands/catfact.js Normal file
View file

@ -0,0 +1,30 @@
const fetch = require("node-fetch")
exports.run = async (bot, message, args) => {
message.channel.startTyping();
try{
fetch('https://catfact.ninja/facts')
.then(res => res.json())
.then(json => message.channel.send(`__**Did you know?**__\n${json.data[0].fact}`))
.catch(err => {
message.channel.send(`<:error:466995152976871434> An error has occurred: ${err}`);
});
} catch(err) {
message.channel.send(`<:error:466995152976871434> An error has occurred: ${err}`);
};
message.channel.stopTyping();
};
exports.conf = {
enabled: true,
guildOnly: false,
aliases: ["kittenfact"],
permLevel: "User",
requiredPerms: []
};
exports.help = {
name: "catfact",
category: "Fun",
description: "Sends a fun fact about a cat.",
usage: "catfact/kittenfact"
};

18
src/commands/changelog.js Normal file
View file

@ -0,0 +1,18 @@
exports.run = (client, message) => {
message.channel.send(client.version.changelog)
};
exports.conf = {
enabled: true,
guildOnly: false,
aliases: ["updates"],
permLevel: "User",
requiredPerms: []
};
exports.help = {
name: "changelog",
category: "Utility",
description: "Gives you the changes/features introduced with the latest update",
usage: "changelog"
};

29
src/commands/chatlogs.js Normal file
View file

@ -0,0 +1,29 @@
exports.run = async (client, message) => {
const settings = message.settings;
if (!client.settings.has(message.guild.id)) client.settings.set(message.guild.id, {});
if (message.channel.name !== settings.chatlogsChannel) {
client.settings.set(message.guild.id, message.channel.name, "chatlogsChannel")
message.channel.send(`<:success:466995111885144095> Chat logs will now be displayed in \`${message.channel.name}\``);
} else {
client.settings.set(message.guild.id, "off", "chatlogsChannel")
message.channel.send(`<:success:466995111885144095> Chat logs disabled.`);
}
};
exports.conf = {
enabled: true,
guildOnly: true,
aliases: [],
permLevel: "Administrator",
requiredPerms: []
};
exports.help = {
name: "chatlogs",
category: "Configure",
description: "Enables chat logging in your server.",
usage: "chatlogs **OR** chatlogs off"
};

24
src/commands/coinflip.js Normal file
View file

@ -0,0 +1,24 @@
exports.run = (client, message, args) => {
var coin = [
"Heads!",
"Tails!"
];
let mess = coin.random();
message.channel.send(mess);
};
exports.conf = {
enabled: true,
guildOnly: false,
aliases: ["flip"],
permLevel: "User",
requiredPerms: []
};
exports.help = {
name: "coinflip",
category: "Fun",
description: "Flips a coin!",
usage: "coinflip"
};

57
src/commands/colour.js Normal file
View file

@ -0,0 +1,57 @@
const randomColour = require("randomcolor");
exports.run = async (client, message, args, level) => {
var colour;
if(!args[0]) {
colour = randomColour();
} else if(isHex(args.join(" ")) != true) {
colour = stringToHex(args.join(" "));
} else {
colour = args[0]
}
embed = new Discord.MessageEmbed();
embed.setTitle(colour)
embed.setColor(colour);
embed.setImage(`https://fakeimg.pl/256x256/${colour.replace("#", "")}/?text=%20`);
message.channel.send(embed)
};
function isHex(string) {
var str = string;
if(str.charAt(0) == "#") {
str = str.slice(1)
};
return typeof str === 'string'
&& str.length === 6
&& !isNaN(Number('0x' + str))
}
function stringToHex(string) {
var hash = 0;
for (var i = 0; i < string.length; i++) {
hash = string.charCodeAt(i) + ((hash << 5) - hash);
}
var colour = '#';
for (var i = 0; i < 3; i++) {
var value = (hash >> (i * 8)) & 0xFF;
colour += ('00' + value.toString(16)).substr(-2);
}
return colour;
};
exports.conf = {
enabled: true,
guildOnly: false,
aliases: ["color"],
permLevel: "User",
requiredPerms: []
};
exports.help = {
name: "colour",
category: "Utility",
description: "Gives you a random colour",
usage: "colour <hex> **OR** colour <text>"
};

20
src/commands/credits.js Normal file
View file

@ -0,0 +1,20 @@
exports.run = async (client, message, args) => {
message.channel.send(
`__**Credits:**__\n\`mudkipscience#8904\`, \`FLGX#9896\` and \`TheCakeChicken#9088\` for developing the bot\n\`An Idiots Guide\` for the Guidebot bot base\n\`Tina the Cyclops girl#0064\` for helping me not suck at coding\n\`AirVentTrent\` for the icon, find him on Instagram\n\`Terryiscool160\` for contributing to Woomy.`
);
};
exports.conf = {
enabled: true,
guildOnly: false,
aliases: [],
permLevel: "User",
requiredPerms: []
};
exports.help = {
name: "credits",
category: "Utility",
description: "Cool people",
usage: "credits"
};

45
src/commands/creeper.js Normal file
View file

@ -0,0 +1,45 @@
const lyric = require('../../resources/other/lyrics.json')
exports.run = async (client, message, args, level) => {
var lyrics = lyric.creeper;
var runtop = true;
var runbottom = false;
for(var br = 0; br < lyrics.length; br++) {
{
if (runtop === true) {
var response = await client.awaitReply(message, lyrics[br]);
runbottom = false;
};
if (runbottom === true) {
if (response !== lyrics[br]) {
return message.channel.send("Those aren't the lyrics!")
}
runtop = false
};
} if (runtop === true) {
runtop = false
runbottom = true
} else if (runbottom === true) {
runtop = true
runbottom = false
}
}
message.channel.send("What a lovely duet!")
};
exports.conf = {
enabled: true,
guildOnly: false,
aliases: [],
permLevel: "User",
requiredPerms: []
};
exports.help = {
name: "creeper",
category: "Fun",
description: "Aww man",
usage: "creeper"
};

69
src/commands/cuddle.js Normal file
View file

@ -0,0 +1,69 @@
const API = require('nekos.life');
const {sfw} = new API();
exports.run = async (client, message, args) => {
if(!args[0]) {
return message.channel.send(`<:error:466995152976871434> You didn't say who you wanted to cuddle! Usage: \`${client.commands.get(`cuddle`).help.usage}\``)
};
var people = "";
for (var i = 0; i < args.length; i++) {
var user = client.getUserFromMention(args[i])
if (user) {
user = message.guild.members.cache.get(user.id).displayName;
} else {
users = client.searchForMembers(message.guild, args[i]);
if (users.length > 1)
return message.channel.send(
"<:error:466995152976871434> Found multiple users for `" + args[i] + "`, Please be more specific or mention the user instead."
);
else if (users.length == 0)
return message.channel.send(
"<:error:466995152976871434> That user doesn't seem to exist. Try again!"
);
user = users[0].displayName;
};
if(i+1 == args.length && args.length > 1) {
people += `**and** ${user}!`
} else if(args.length < 2) {
people += `${user}!`;
} else if(args.length == 2 && i == 0) {
people += `${user} `;
} else {
people += `${user}, `;
};
};
message.channel.startTyping();
try {
sfw.cuddle().then((json) => {
embed = new Discord.MessageEmbed();
embed.setImage(json.url)
embed.setColor(client.embedColour(message));
embed.setDescription(`**${message.guild.members.cache.get(message.author.id).displayName}** cuddled **${people}**`)
message.channel.send(embed)
message.channel.stopTyping();
});
} catch (err) {
client.logger.error("cuddle.js: " + err);
message.channel.send(`<:error:466995152976871434> An error has occurred: ${err}`)
message.channel.stopTyping();
};
};
exports.conf = {
enabled: true,
guildOnly: true,
aliases: [],
permLevel: "User",
requiredPerms: ["EMBED_LINKS"]
};
exports.help = {
name: "cuddle",
category: "Action",
description: "cuddle someone!",
usage: "cuddle [@user/user] (you can cuddle as many people as you want!)"
};

27
src/commands/dice.js Normal file
View file

@ -0,0 +1,27 @@
exports.run = async (bot, message, args) => {
if (args.length === 0) {
message.channel.send(`🎲 You rolled a ${Array.from(Array(6).keys()).random() + 1}!`);
} else {
if (args[0].match(/^\d+$/)) {
message.channel.send(`🎲 You rolled a ${Array.from(Array(parseInt(args[0])).keys()).random() + 1}!`);
} else {
message.channel.send(`🎲 You rolled a ${Array.from(Array(6).keys()).random() + 1}!`);
}
}
};
exports.conf = {
enabled: true,
guildOnly: false,
aliases: ["diceroll", "roll"],
permLevel: "User",
requiredPerms: []
};
exports.help = {
name: "dice",
category: "Fun",
description: "Rolls a dice.",
usage: "dice <faces>"
};

30
src/commands/dog.js Normal file
View file

@ -0,0 +1,30 @@
const API = require('nekos.life');
const {sfw} = new API();
exports.run = async (client, message) => {
message.channel.startTyping();
try {
sfw.woof().then((json) => {
message.channel.send(json.url)
message.channel.stopTyping();
});
} catch (err) {
client.logger.error("dog.js: " + err);
message.channel.send(`<:error:466995152976871434> An error has occurred: ${err}`)
message.channel.stopTyping();
};
};
exports.conf = {
enabled: true,
guildOnly: false,
aliases: [],
permLevel: "User",
requiredPerms: ["EMBED_LINKS"]
};
exports.help = {
name: "dog",
category: "Image",
description: "Sends you dog pics.",
usage: "dog"
};

30
src/commands/dogfact.js Normal file
View file

@ -0,0 +1,30 @@
const fetch = require("node-fetch");
exports.run = async (bot, message, args) => {
message.channel.startTyping();
try{
fetch('https://dog-api.kinduff.com/api/facts')
.then(res => res.json())
.then(json => message.channel.send(`__**Did you know?**__\n ${json.facts[0]}`))
.catch(err => {
message.channel.send(`<:error:466995152976871434> An error has occurred: ${err}`);
});
} catch(err) {
message.channel.send(`<:error:466995152976871434> An error has occurred: ${err}`);
};
message.channel.stopTyping();
};
exports.conf = {
enabled: true,
guildOnly: false,
aliases: ["pupfact"],
permLevel: "User",
requiredPerms: []
};
exports.help = {
name: "dogfact",
category: "Fun",
description: "Sends a fun fact about a doggo.",
usage: "dogfact/pupfact"
};

42
src/commands/emoji.js Normal file
View file

@ -0,0 +1,42 @@
exports.run = async (client, message, args) => {
if(!args[0]) {
return message.channel.send(`You need to specify a custom emoji. Usage: \`${client.commands.get(`emoji`).help.usage}\``)
};
var ID;
var format = ".png"
var string = args[0].replace(/\D/g,'');
if(args[0].charAt(1) == "a" && args[0].charAt(2) == ":") {
format = ".gif"
};
if(string.length > 18) {
ID = string.slice(string.length - 18);
} else {
ID = string;
};
if(!ID) {
return message.channel.send(`<:error:466995152976871434> Invalid emoji. This command only works with custom emojis.`)
};
message.channel.send("https://cdn.discordapp.com/emojis/" + ID + format)
};
exports.conf = {
enabled: true,
guildOnly: false,
aliases: [],
permLevel: "User",
requiredPerms: []
};
exports.help = {
name: "emoji",
category: "Utility",
description: "Enlarges and links an custom emoji",
usage: "emoji [emoji]"
};

56
src/commands/emojify.js Normal file
View file

@ -0,0 +1,56 @@
Discord = require("discord.js");
exports.run = (client, message, args) => {
if (!args[0]) {
return message.channel.send(
`<:error:466995152976871434> You must include a message for me to emojify! Usage: \`${client.commands.get(`emojify`).help.usage}\``
);
};
const specialChars = {
'0': ':zero:',
'1': ':one:',
'2': ':two:',
'3': ':three:',
'4': ':four:',
'5': ':five:',
'6': ':six:',
'7': ':seven:',
'8': ':eight:',
'9': ':nine:',
'#': ':hash:',
'*': ':asterisk:',
'?': ':grey_question:',
'!': ':grey_exclamation:',
' ': ' '
};
const emojified = `${args.join(' ')}`.toLowerCase().split('').map(letter => {
if (/[a-z]/g.test(letter)) {
return `:regional_indicator_${letter}: `
} else if (specialChars[letter]) {
return `${specialChars[letter]} `
};
return letter
}).join('');
if(emojified.length > 2000) {
return message.channel.send("<:error:466995152976871434> The emojified message exceeds 2000 characters.")
};
message.channel.send(emojified);
};
exports.conf = {
enabled: true,
guildOnly: false,
aliases: [],
permLevel: "User",
requiredPerms: []
};
exports.help = {
name: "emojify",
category: "Fun",
description: "Changes text into emojis",
usage: "emojify [message]"
};

46
src/commands/eval.js Normal file
View file

@ -0,0 +1,46 @@
const hastebin = require('hastebin-gen');
exports.run = async (client, message, args) => {
const code = args.join(" ");
try {
const evaled = eval(code);
const clean = await client.clean(client, evaled);
if(clean.length > 2000) {
hastebin(clean, { extension: "txt" }).then(haste => {
return message.channel.send('`OUTPUT`\n' + haste);
}).catch(error => {
client.logger.err(error);
});
return;
}
message.channel.send(`\`OUTPUT\` \`\`\`js\n${await clean}\n\`\`\``);
} catch (err) {
const errclean = await client.clean(client, err);
if(errclean.length > 2000) {
hastebin(errclean, { extension: "txt" }).then(haste => {
return message.channel.send('`ERROR`\n' + haste);
}).catch(error => {
client.logger.err(error);
});
return;
}
message.channel.send(`\`ERROR\` \`\`\`xl\n${await errclean}\n\`\`\``);
}
};
exports.conf = {
enabled: true,
guildOnly: false,
aliases: [],
permLevel: "Developer",
requiredPerms: []
};
exports.help = {
name: "eval",
category: "Owner",
description: "Evaluates arbitrary javascript.",
usage: "eval [code]"
};

30
src/commands/fact.js Normal file
View file

@ -0,0 +1,30 @@
const API = require('nekos.life');
const {sfw} = new API();
exports.run = async (client, message) => {
message.channel.startTyping();
try {
sfw.fact().then((json) => {
message.channel.send("__**Did you know?**__\n" + json.fact + ".");
message.channel.stopTyping();
});
} catch (err) {
client.logger.error("fact.js: " + err);
message.channel.send(`<:error:466995152976871434> An error has occurred: ${err}`)
message.channel.stopTyping();
};
};
exports.conf = {
enabled: true,
guildOnly: false,
aliases: ["randomfact"],
permLevel: "User",
requiredPerms: []
};
exports.help = {
name: "fact",
category: "Fun",
description: "Sends you a random fact.",
usage: "fact"
};

69
src/commands/feed.js Normal file
View file

@ -0,0 +1,69 @@
const API = require('nekos.life');
const {sfw} = new API();
exports.run = async (client, message, args) => {
if(!args[0]) {
return message.channel.send(`<:error:466995152976871434> You didn't say who you wanted to feed! Usage: \`${client.commands.get(`feed`).help.usage}\``)
};
var people = "";
for (var i = 0; i < args.length; i++) {
var user = client.getUserFromMention(args[i])
if (user) {
user = message.guild.members.cache.get(user.id).displayName;
} else {
users = client.searchForMembers(message.guild, args[i]);
if (users.length > 1)
return message.channel.send(
"<:error:466995152976871434> Found multiple users for `" + args[i] + "`, Please be more specific or mention the user instead."
);
else if (users.length == 0)
return message.channel.send(
"<:error:466995152976871434> That user doesn't seem to exist. Try again!"
);
user = users[0].displayName;
};
if(i+1 == args.length && args.length > 1) {
people += `**and** ${user}!`
} else if(args.length < 2) {
people += `${user}!`;
} else if(args.length == 2 && i == 0) {
people += `${user} `;
} else {
people += `${user}, `;
};
};
message.channel.startTyping();
try {
sfw.feed().then((json) => {
embed = new Discord.MessageEmbed();
embed.setImage(json.url)
embed.setColor(client.embedColour(message));
embed.setDescription(`**${message.guild.members.cache.get(message.author.id).displayName}** fed **${people}**`)
message.channel.send(embed)
message.channel.stopTyping();
});
} catch (err) {
client.logger.error("feed.js: " + err);
message.channel.send(`<:error:466995152976871434> An error has occurred: ${err}`)
message.channel.stopTyping();
};
};
exports.conf = {
enabled: true,
guildOnly: true,
aliases: [],
permLevel: "User",
requiredPerms: ["EMBED_LINKS"]
};
exports.help = {
name: "feed",
category: "Action",
description: "feed someone!",
usage: "feed [@user/user] (you can feed as many people as you want!)"
};

28
src/commands/feedback.js Normal file
View file

@ -0,0 +1,28 @@
exports.run = (client, message, args, level) => {
if(!args[0]) return message.channel.send(`<:error:466995152976871434> You didn't give me any feedback! Usage: \`${client.commands.get(`feedback`).help.usage}\``)
const feedback = args.join(" ")
let guild = client.guilds.cache.get("410990517841690625")
let channel = guild.channels.cache.get("438825830949453824")
let embed = new Discord.MessageEmbed()
.setTitle(`Feedback:`)
.setColor(client.embedColour(message))
.addField("User:",message.author.tag)
.addField("Feedback: ", feedback)
channel.send({embed: embed})
message.channel.send("<:success:466995111885144095> Your feedback has been sent to my developer. Thank you!")
};
exports.conf = {
enabled: true,
guildOnly: false,
aliases: ["suggest"],
permLevel: "User",
requiredPerms: []
};
exports.help = {
name: "feedback",
category: "Utility",
description: "Send feedback to my developer.",
usage: "feedback [message]"
};

75
src/commands/fixmusic.js Normal file
View file

@ -0,0 +1,75 @@
const { getGuild } = require('../modules/music')
module.exports.run = async (client, message, args, level) =>{
guild = getGuild(message.guild.id)
const lvl = client.config.permLevels.find(l => l.level === level)
if (lvl.level >= 1) {
guild.queue = []
guild.playing = false
guild.paused = false
guild.skippers = []
guild.fixers = []
guild.channel = null
if (guild.dispatcher) {
guild.dispatcher.end('silent')
}
guild.fixers = []
message.channel.send(
'<:success:466995111885144095> Music has been fixed!'
)
return
}
const vc = message.guild.members.cache.get(client.user.id).voice.channel
if (guild.fixers.indexOf(message.author.id) === -1) {
guild.fixers.push(message.author.id)
if (guild.fixers.length >= Math.ceil(vc.members.filter(member => !member.user.bot).size / 2)) {
guild.queue = []
guild.playing = false
guild.paused = false
guild.skippers = []
guild.fixers = []
guild.channel = null
if (guild.dispatcher) {
guild.dispatcher.end('silent')
}
guild.fixers = []
message.channel.send(
'<:success:466995111885144095> Music has been fixed!'
)
} else {
message.channel.send(
`<:success:466995111885144095> Your vote has been acknowledged! **${guild.fixers.length + '/' + Math.ceil(vc.members.filter(member => !member.user.bot).size / 2)}**`
)
};
} else {
message.channel.send(
'<:denied:466995195150336020> You cannot vote twice!'
)
}
}
exports.conf = {
enabled: true,
guildOnly: true,
aliases: [],
permLevel: "User",
requiredPerms: []
};
exports.help = {
name: "fixmusic",
category: "Music",
description: 'Fixes music if it breaks.',
usage: 'fixmusic',
};

31
src/commands/forceskip.js Normal file
View file

@ -0,0 +1,31 @@
const { skip, getGuild } = require('../modules/music')
exports.run = (client, message) => {
const guild = getGuild(message.guild.id)
if (guild.queue.length < 1 || !guild.playing || !guild.dispatcher) {
return message.channel.send(
'<:error:466995152976871434> Nothing is playing.'
)
}
skip(message.guild, 'skip')
guild.skippers = []
message.channel.send('<:success:466995111885144095> Song skipped.')
};
exports.conf = {
enabled: true,
guildOnly: true,
aliases: [],
permLevel: "Moderator",
requiredPerms: []
};
exports.help = {
name: "forceskip",
category: "Music",
description: "Skips the currently playing song without requiring a vote.",
usage: "forceskip"
};

39
src/commands/garfield.js Normal file
View file

@ -0,0 +1,39 @@
const fetch = require("node-fetch")
const { MessageEmbed } = require('discord.js')
exports.run = async (client, message) => {
message.channel.startTyping();
try {
fetch('https://garfield-comics.glitch.me/~SRoMG/?date=xxxx')
.then(res => res.json())
.then(json => {
const embed = new MessageEmbed()
.setTitle(`${json.data.name} (No. ${json.data.number})`)
.setColor(client.embedColour(message))
.setURL('https://www.mezzacotta.net/garfield/?comic=' + json.data.number)
.setImage(json.data.image.src);
message.channel.send(embed)
})
.catch(err => {
message.channel.send(`<:error:466995152976871434> An error has occurred: ${err}`);
});
message.channel.stopTyping();
} catch (err) {
message.channel.send(`<:error:466995152976871434> An error has occurred: ${err}`)
message.channel.stopTyping();
};
};
exports.conf = {
enabled: true,
guildOnly: false,
aliases: [],
permLevel: "User",
requiredPerms: ["ATTACH_FILES"]
};
exports.help = {
name: "garfield",
category: "Fun",
description: "Sends you a random garfield comic",
usage: "garfield"
};

87
src/commands/giverole.js Normal file
View file

@ -0,0 +1,87 @@
exports.run = async (client, message, [member, ...role2add], query) => {
if (!member) {
return message.channel.send(
"<:error:466995152976871434> Who am I meant to give a role?"
);
}
let user = message.mentions.members.first();
let users;
if (!user) {
users = client.searchForMembers(message.guild, member);
if (users.length > 1)
return message.channel.send(
"<:error:466995152976871434> Found multiple users! Please be more specific or mention the user instead."
);
else if (users.length == 0)
return message.channel.send(
"<:error:466995152976871434> That user doesn't seem to exist. Try again!"
);
user = users[0];
}
let joinedValue = role2add.join(" ");
let gRole = client.findRole(joinedValue, message);
if (!gRole) {
return message.channel.send(`<:error:466995152976871434> That role doesn't seem to exist. Try again!`);
};
let moderator = message.guild.member(message.author)
if (gRole.position >= moderator.roles.highest.position) {
return message.channel.send(
"<:error:466995152976871434> You cannot give roles higher than your own!"
);
}
var bot = message.guild.members.cache.get(client.user.id)
if (gRole.position >= bot.roles.highest.position) {
return message.channel.send(
`<:error:466995152976871434> I cannot give roles higher than my own!`
);
}
if (user.roles.cache.has(gRole.id)) {
return message.channel.send(
"<:error:466995152976871434> They already have that role!"
);
}
await user.roles.add(gRole.id);
message.channel.send(
`<:success:466995111885144095> Gave \`${user.user.tag}\` the \`${gRole.name}\` role.`
);
if (client.getSettings(message.guild.id).modlogsChannel !== "off") {
const channel = message.guild.channels.cache.find(
channel => channel.name === client.getSettings(message.guild.id).modlogsChannel
);
if (channel) {
let embed = new Discord.MessageEmbed();
embed.setColor("#00c09a");
embed.setAuthor("Role given:", user.user.avatarURL({format: "png", dynamic: true, size: 2048}));
embed.setDescription(`‏‏‎• User: ${user} (${user.user.id})\n‏‏‎• Mod: ${message.author} (${message.author.id})\n‏‏‎• Role: ${gRole}`)
try {
channel.send({ embed });
} catch (err) {
// probably no permissions to send messages/embeds there
};
};
};
};
exports.conf = {
enabled: true,
guildOnly: true,
aliases: ["addrole"],
permLevel: "Moderator",
requiredPerms: ["MANAGE_ROLES"]
};
exports.help = {
name: "giverole",
category: "Moderation",
description: "Gives the user the specified role.",
usage: "giverole [user] [role]"
};

42
src/commands/goodbye.js Normal file
View file

@ -0,0 +1,42 @@
exports.run = async (client, message, args, level) => {
const settings = message.settings;
if (!client.settings.has(message.guild.id)) client.settings.set(message.guild.id, {});
if (args[0]) {
const joinedValue = args.join(" ");
if (joinedValue === settings.welcomeMessage) return message.channel.send(
"<:error:466995152976871434> The leave message is already set to that!"
);
if (!client.settings.has(message.guild.id)) client.settings.set(message.guild.id, {});
if (joinedValue === "off") {
if (!client.settings.has(message.guild.id)) client.settings.set(message.guild.id, {});
client.settings.set(message.guild.id, "off", "leaveMessage");
return message.channel.send(`<:success:466995111885144095> Leave messages have been disabled.`);
}
client.settings.set(message.guild.id, joinedValue, "leaveMessage");
client.settings.set(message.guild.id, message.channel.id, "welcomeChannel")
message.channel.send(`<:success:466995111885144095> Set the leave message to \`${joinedValue}\``);
} else {
if (settings.leaveMessage === "off") {
message.channel.send(`Leave messages are off.`)
} else {
message.channel.send(`The current leave message is: \`${settings.leaveMessage}\``)
}
}
};
exports.conf = {
enabled: true,
guildOnly: true,
aliases: [],
permLevel: "Administrator",
requiredPerms: []
};
exports.help = {
name: "goodbye",
category: "Configure",
description: "Sets the leave message for this server. try using [[server]], [[user]] and [[members]] in your message!",
usage: "goodbye <message> **OR** goodbye off"
};

60
src/commands/hackban.js Normal file
View file

@ -0,0 +1,60 @@
exports.run = async (client, message, args) => {
const settings = (message.settings = client.getSettings(message.guild.id));
if(!args[0]) {
return message.channel.send(
`<:error:466995152976871434> No user ID provided. Usage: \`${client.commands.get(`hackban`).help.usage}\``
);
};
user = client.users.cache.get(args[0])
if(!user) {
return message.channel.send("<:error:466995152976871434> Invalid ID")
}
if(message.guild.member(args[0])) {
if(!message.guild.member(args[0]).bannable) {
return message.channel.send("<:error:466995152976871434> User is not bannable.")
}
}
let reason = args.slice(1).join(" ");
if (!reason) reason = `Banned by ${message.author.tag}`;
await message.guild.members.ban(args[0], {reason: reason}).catch(console.error);
message.channel.send(`<:success:466995111885144095> Hackbanned \`${user.tag}\``);
if (settings.modlogsChannel !== "off") {
const channel = message.guild.channels.cache.find(
channel => channel.name === settings.modlogsChannel
);
if (channel) {
let embed = new Discord.MessageEmbed();
embed.setColor("#BC0057");
embed.setAuthor("User banned!", user.avatarURL({format: "png", dynamic: true, size: 2048}));
embed.setDescription(
`• User: ${user.tag} (${user.id})\n• Mod: ${message.author} (${message.author.id})\n• Reason: ${reason}`
);
try {
channel.send(embed);
} catch (err) {
// probably no permissions to send messages/embeds there
};
}
};
};
exports.conf = {
enabled: true,
guildOnly: true,
aliases: [],
permLevel: "Moderator",
requiredPerms: ["BAN_MEMBERS"]
};
exports.help = {
name: "hackban",
category: "Moderation",
description: "Ban users who are not in the server.",
usage: "ban [userID] <reason>"
};

174
src/commands/help.js Normal file
View file

@ -0,0 +1,174 @@
exports.run = (client, message, args, level) => {
embed = new Discord.MessageEmbed();
embed.setColor(client.embedColour(message));
var ran = false;
var output = "";
var commands = 0;
var prefix;
var currentCategory;
if(message.guild) {
prefix = message.settings.prefix;
} else {
prefix = client.config.defaultSettings.prefix;
};
if(!args[0]) {
embed.setTitle(`Command list`);
embed.setDescription(`For more information on a specific command use \`${prefix}help <command>\`\nFor the full command list use \`${prefix}help all\`\n`);
const myCommands = message.guild ? client.commands.filter(
cmd => client.levelCache[cmd.conf.permLevel] <= level
) : client.commands.filter(
cmd => client.levelCache[cmd.conf.permLevel] <= level && cmd.conf.guildOnly !== true
);
const commandNames = myCommands.keyArray();
const longest = commandNames.reduce(
(long, str) => Math.max(long, str.length),
0
);
const sorted = myCommands.array().sort(
(p, c) => p.help.category > c.help.category ? 1 : p.help.name > c.help.name && p.help.category === c.help.category ? 1 : -1
);
sorted.forEach( c => {
const cat = c.help.category;
if (currentCategory !== cat) {
if(ran == true) {
embed.addField(currentCategory + ` [${commands}]`, output)
output = "";
commands = 0;
}
currentCategory = cat;
ran = true
}
output += `\`${c.help.name}\` `;
commands = commands + 1;
});
embed.addField(currentCategory + ` [${commands}]`, output);
embed.addField(
"Invite me",
"[Click here](https://discord.com/oauth2/authorize?client_id=435961704145485835&permissions=8&scope=bot) to add me to your server",
true
);
embed.addField(
"Support",
"[Click here](https://discord.gg/HCF8mdv) if bot broke",
true
);
message.channel.send(embed);
return;
};
if(args[0].toLowerCase() == "all") {
embed.setTitle(`Command list`);
embed.setDescription(`For more information on a specific command use \`${prefix}help <command>\`\nFor the full command list use \`${prefix}help all\`\n`);
const myCommands = client.commands
const commandNames = myCommands.keyArray();
const longest = commandNames.reduce(
(long, str) => Math.max(long, str.length),
0
);
const sorted = myCommands.array().sort(
(p, c) => p.help.category > c.help.category ? 1 : p.help.name > c.help.name && p.help.category === c.help.category ? 1 : -1
);
sorted.forEach( c => {
const cat = c.help.category;
if (currentCategory !== cat) {
if(ran == true) {
embed.addField(currentCategory + ` [${commands}]`, output)
output = "";
commands = 0;
}
currentCategory = cat;
ran = true
}
output += `\`${c.help.name}\` `;
commands = commands + 1;
});
embed.addField(currentCategory + ` [${commands}]`, output);
embed.addField(
"Invite me",
"[Click here](https://discord.com/oauth2/authorize?client_id=435961704145485835&permissions=8&scope=bot) to add me to your server",
true
);
embed.addField(
"Support",
"[Click here](https://discord.gg/HCF8mdv) if bot broke",
true
);
message.channel.send(embed);
return;
};
if(args[0]) {
let command = args.shift().toLowerCase();
let cmd = client.commands.get(command) || client.commands.get(client.aliases.get(command));
if(!client.commands.has(command)) {
return message.channel.send("<:error:466995152976871434> That command doesn't exist!")
};
command = client.commands.get(command);
var requiredPerms = "";
if(cmd.conf.requiredPerms.length > 0 ) {
requiredPerms = "`" + cmd.conf.requiredPerms.join("`, `") + "`";
} else {
requiredPerms = "None";
};
var aliases = "";
if(cmd.conf.aliases.length > 0 ) {
aliases = "`" + cmd.conf.aliases.join("`, `") + "`";
} else {
aliases = "None";
};
embed.setTitle(prefix + command.help.name);
embed.setDescription(
`• **Description:** ${command.help.description}\n• **Usage:** ${prefix + command.help.usage}\n• **Permission Level:** ${cmd.conf.permLevel} \n• **Guild Only:** ${cmd.conf.guildOnly}\n• **Aliases:** ${aliases}\n• **Required perms:** ${requiredPerms}`
);
embed.setFooter("Arguments in [] are required, <> are optional.");
message.channel.send(embed);
return;
};
};
exports.conf = {
enabled: true,
guildOnly: false,
aliases: ["h", "cmds"],
permLevel: "User",
requiredPerms: ["EMBED_LINKS"]
};
exports.help = {
name: "help",
category: "Utility",
description:
"Displays all the commands you are able to use.",
usage: "help <command> **OR** help all"
};

69
src/commands/hug.js Normal file
View file

@ -0,0 +1,69 @@
const API = require('nekos.life');
const {sfw} = new API();
exports.run = async (client, message, args) => {
if(!args[0]) {
return message.channel.send(`<:error:466995152976871434> You didn't say who you wanted to hug! Usage: \`${client.commands.get(`hug`).help.usage}\``)
};
var people = "";
for (var i = 0; i < args.length; i++) {
var user = client.getUserFromMention(args[i])
if (user) {
user = message.guild.members.cache.get(user.id).displayName;
} else {
users = client.searchForMembers(message.guild, args[i]);
if (users.length > 1)
return message.channel.send(
"<:error:466995152976871434> Found multiple users for `" + args[i] + "`, Please be more specific or mention the user instead."
);
else if (users.length == 0)
return message.channel.send(
"<:error:466995152976871434> That user doesn't seem to exist. Try again!"
);
user = users[0].displayName;
};
if(i+1 == args.length && args.length > 1) {
people += `**and** ${user}!`
} else if(args.length < 2) {
people += `${user}!`;
} else if(args.length == 2 && i == 0) {
people += `${user} `;
} else {
people += `${user}, `;
};
};
message.channel.startTyping();
try {
sfw.hug().then((json) => {
embed = new Discord.MessageEmbed();
embed.setImage(json.url)
embed.setColor(client.embedColour(message));
embed.setDescription(`**${message.guild.members.cache.get(message.author.id).displayName}** hugged **${people}**`)
message.channel.send(embed)
message.channel.stopTyping();
});
} catch (err) {
client.logger.error("hug.js: " + err);
message.channel.send(`<:error:466995152976871434> An error has occurred: ${err}`)
message.channel.stopTyping();
};
};
exports.conf = {
enabled: true,
guildOnly: true,
aliases: [],
permLevel: "User",
requiredPerms: ["EMBED_LINKS"]
};
exports.help = {
name: "hug",
category: "Action",
description: "Hug someone!",
usage: "hug [@user/user] (you can hug as many people as you want!)"
};

36
src/commands/identity.js Normal file
View file

@ -0,0 +1,36 @@
const identities = require ("../../resources/other/identities.json");
exports.run = async (client, message, args) => {
var output = "";
if(!args[0]) {
for (var key of Object.keys(identities)) {
output += `${key}, `
};
return message.channel.send(`__**Identities**__\n${output.slice(0, -2)}`);
} else {
if(args.join(" ").toLowerCase() == "attack helicopter" || args.join(" ").toLowerCase() == "apache attack helicopter" || args.join(" ").toLowerCase() == "apache") {
return message.channel.send({
files: [new Discord.MessageAttachment("./resources/images/attackhelicopter.jpg")]
});
}
output = identities[args.join(" ").toLowerCase()];
if(!output) {
return message.channel.send("<:error:466995152976871434> No results for that query.");
};
return message.channel.send(`__**${output.name.toProperCase()}**__\n${output.description}`);
};
};
exports.conf = {
enabled: true,
guildOnly: false,
aliases: ["identities"],
permLevel: "User",
requiredPerms: []
};
exports.help = {
name: "identity",
category: "Fun",
description: "Gives you information about the specified identity.",
usage: "identity [identity]"
};

View file

@ -0,0 +1,31 @@
const fetch = require("node-fetch")
exports.run = async (client, message) => {
message.channel.startTyping();
try {
fetch('http://inspirobot.me/api?generate=true')
.then(res => res.text())
.then(body => message.channel.send({files: [new Discord.MessageAttachment(body)]}))
.catch(err => {
message.channel.send(`<:error:466995152976871434> An error has occurred: ${err}`);
});
message.channel.stopTyping();
} catch (err) {
message.channel.send(`<:error:466995152976871434> An error has occurred: ${err}`)
message.channel.stopTyping();
};
};
exports.conf = {
enabled: true,
guildOnly: false,
aliases: ["inspire"],
permLevel: "User",
requiredPerms: []
};
exports.help = {
name: "inspirobot",
category: "Fun",
description: "Returns an inspirational message generated by inspirobot.",
usage: "inspirobot"
};

20
src/commands/invite.js Normal file
View file

@ -0,0 +1,20 @@
exports.run = async (client, message) => {
message.channel.send(
`Use this link to invite me to your server:\n<https://discord.com/oauth2/authorize?client_id=${client.user.id}&permissions=2134240503&scope=bot>`
);
};
exports.conf = {
enabled: true,
guildOnly: false,
aliases: [],
permLevel: "User",
requiredPerms: []
};
exports.help = {
name: "invite",
category: "Utility",
description: "Sends you a link so you can add Woomy to your own servers",
usage: "invite"
};

View file

@ -0,0 +1,30 @@
const API = require('nekos.life');
const {sfw} = new API();
exports.run = async (client, message) => {
message.channel.startTyping();
try {
sfw.kemonomimi().then((json) => {
message.channel.send(json.url)
message.channel.stopTyping();
});
} catch (err) {
client.logger.error("kemonomimi.js: " + err);
message.channel.send(`<:error:466995152976871434> An error has occurred: ${err}`)
message.channel.stopTyping();
};
};
exports.conf = {
enabled: false,
guildOnly: false,
aliases: [],
permLevel: "User",
requiredPerms: ["EMBED_LINKS"]
};
exports.help = {
name: "kemonomimi",
category: "Image",
description: "Sends you pictures of people with animal characteristics.",
usage: "kemonomimi"
};

87
src/commands/kick.js Normal file
View file

@ -0,0 +1,87 @@
exports.run = async (client, message, args) => {
const settings = client.getSettings(message.guild.id);
if(!args[0]) {
return message.channel.send("<:error:466995152976871434> Who am I meant to kick?")
}
let user = message.mentions.members.first();
if (!user) {
let users;
users = client.searchForMembers(message.guild, args[0]);
if (users.length > 1)
return message.channel.send(
"<:error:466995152976871434> Found multiple users! Please be more specific or mention the user instead."
);
else if (users.length == 0)
return message.channel.send(
"<:error:466995152976871434> That user doesn't seem to exist. Try again!"
);
user = users[0];
}
if (user.user.id === client.user.id) {
return message.channel.send("lol no")
}
if (user.user.id === message.guild.owner.id) {
return message.channel.send("<:error:466995152976871434> You can't kick the owner!")
}
let moderator = message.guild.member(message.author)
if (user.roles.highest.position >= moderator.roles.highest.position && moderator.user.id !== message.guild.ownerID) {
return message.channel.send(
`<:error:466995152976871434> You can't kick people higher ranked than yourself!`
);
}
let bot = message.guild.member(client.user)
if (user.roles.highest.position >= bot.roles.highest.position) {
return message.channel.send(
`<:error:466995152976871434> I can't kick people who are higher ranked than me!`
);
}
if (!user.bannable)
return message.channel.send(
"<:error:466995152976871434> Specified user is not bannable."
);
let reason = args.slice(1).join(" ");
if (!reason) reason = `Kicked by ${message.author.tag}`;
await user.kick(reason).catch(console.error);
message.channel.send(`<:success:466995111885144095> Kicked \`${user.user.tag}\``);
if (settings.modlogsChannel !== "off") {
const channel = message.guild.channels.cache.find(
channel => channel.name === settings.modlogsChannel
);
if (channel) {
let embed = new Discord.MessageEmbed();
embed.setColor("#fd0061");
embed.setAuthor("User kicked!", user.user.avatarURL({format: "png", dynamic: true, size: 2048}));
embed.setDescription(
`• User: ${user.user.tag} (${user.user.id})\n• Mod: ${message.author} (${message.author.id})\n• Reason: ${reason}`
);
try {
channel.send({ embed });
} catch (err) {
// probably no permissions to send messages/embeds there
};
};
};
};
exports.conf = {
enabled: true,
guildOnly: true,
aliases: [],
permLevel: "Moderator",
requiredPerms: ["KICK_MEMBERS"]
};
exports.help = {
name: "kick",
category: "Moderation",
description: "Kicks specified user.",
usage: "kick [user] <reason>"
};

69
src/commands/kiss.js Normal file
View file

@ -0,0 +1,69 @@
const API = require('nekos.life');
const {sfw} = new API();
exports.run = async (client, message, args) => {
if(!args[0]) {
return message.channel.send(`<:error:466995152976871434> You didn't say who you wanted to kiss! Usage: \`${client.commands.get(`kiss`).help.usage}\``)
};
var people = "";
for (var i = 0; i < args.length; i++) {
var user = client.getUserFromMention(args[i])
if (user) {
user = message.guild.members.cache.get(user.id).displayName;
} else {
users = client.searchForMembers(message.guild, args[i]);
if (users.length > 1)
return message.channel.send(
"<:error:466995152976871434> Found multiple users for `" + args[i] + "`, Please be more specific or mention the user instead."
);
else if (users.length == 0)
return message.channel.send(
"<:error:466995152976871434> That user doesn't seem to exist. Try again!"
);
user = users[0].displayName;
};
if(i+1 == args.length && args.length > 1) {
people += `**and** ${user}!`
} else if(args.length < 2) {
people += `${user}!`;
} else if(args.length == 2 && i == 0) {
people += `${user} `;
} else {
people += `${user}, `;
};
};
message.channel.startTyping();
try {
sfw.kiss().then((json) => {
embed = new Discord.MessageEmbed();
embed.setImage(json.url)
embed.setColor(client.embedColour(message));
embed.setDescription(`**${message.guild.members.cache.get(message.author.id).displayName}** kissed **${people}**`)
message.channel.send(embed)
message.channel.stopTyping();
});
} catch (err) {
client.logger.error("kiss.js: " + err);
message.channel.send(`<:error:466995152976871434> An error has occurred: ${err}`)
message.channel.stopTyping();
};
};
exports.conf = {
enabled: true,
guildOnly: true,
aliases: [],
permLevel: "User",
requiredPerms: ["EMBED_LINKS"]
};
exports.help = {
name: "kiss",
category: "Action",
description: "Kiss someone!",
usage: "kiss [@user/user] (you can kiss as many people as you want!)"
};

31
src/commands/kitsune.js Normal file
View file

@ -0,0 +1,31 @@
const fetch = require("node-fetch")
exports.run = async (client, message, args) => {
message.channel.startTyping();
try{
fetch(`https://purrbot.site/api/img/sfw/kitsune/img/`)
.then(res => res.json())
.then(json => message.channel.send(json.link))
.catch(err => {
message.channel.send(`<:error:466995152976871434> An error has occurred: ${err}`);
});
message.channel.stopTyping();
} catch(err) {
message.channel.send(`<:error:466995152976871434> An error has occurred: ${err}`);
message.channel.stopTyping();
};
};
exports.conf = {
enabled: false,
guildOnly: false,
aliases: ['foxgirl'],
permLevel: "User",
requiredPerms: ["EMBED_LINKS"]
};
exports.help = {
name: "kitsune",
category: "Image",
description: "Sends you cute wholesome pictures of foxgirls.",
usage: "kitsune"
};

30
src/commands/lizard.js Normal file
View file

@ -0,0 +1,30 @@
const API = require('nekos.life');
const {sfw} = new API();
exports.run = async (client, message) => {
message.channel.startTyping();
try {
sfw.lizard().then((json) => {
message.channel.send(json.url)
message.channel.stopTyping();
});
} catch (err) {
client.logger.error("lizard.js: " + err);
message.channel.send(`<:error:466995152976871434> An error has occurred: ${err}`)
message.channel.stopTyping();
};
};
exports.conf = {
enabled: true,
guildOnly: true,
aliases: [],
permLevel: "User",
requiredPerms: ["EMBED_LINKS"]
};
exports.help = {
name: "lizard",
category: "Image",
description: "Sends pictures of lizards.",
usage: "lizard"
};

31
src/commands/lmgtfy.js Normal file
View file

@ -0,0 +1,31 @@
const identities = require ("../../resources/other/identities.json");
exports.run = async (client, message, args) => {
if (!args[0]) {
return message.channel.send("Missing arguments, please provide me with a query!")
}
const query = args.join("+")
let link = ("https://lmgtfy.com/?q=" + query)
if (message.flags.includes('d')) {
link = "https://lmgtfy.com/?q=" + query + "&pp=1&s=d"
}
message.channel.send(link)
};
exports.conf = {
enabled: true,
guildOnly: false,
aliases: [],
permLevel: "User",
requiredPerms: []
};
exports.help = {
name: "lmgtfy",
category: "Fun",
description: "For when you need to remind someone search engines exist..",
usage: "lmgtfy <question>"
};

28
src/commands/modlogs.js Normal file
View file

@ -0,0 +1,28 @@
exports.run = async (client, message) => {
const settings = message.settings;
if (!client.settings.has(message.guild.id)) client.settings.set(message.guild.id, {});
if (message.channel.name !== settings.modlogsChannel) {
client.settings.set(message.guild.id, message.channel.name, "modlogsChannel")
message.channel.send(`<:success:466995111885144095> Mod logs will now be displayed in \`${message.channel.name}\``);
} else {
client.settings.set(message.guild.id, "off", "modlogsChannel")
message.channel.send(`<:success:466995111885144095> Mod logging disabled.`);
}
};
exports.conf = {
enabled: true,
guildOnly: true,
aliases: [],
permLevel: "Administrator",
requiredPerms: []
};
exports.help = {
name: "modlogs",
category: "Configure",
description: "Enables mod action logging in your server.",
usage: "modlogs **OR** modlogs off"
};

61
src/commands/modrole.js Normal file
View file

@ -0,0 +1,61 @@
exports.run = async (client, message, args) => {
const settings = message.settings;
if (!client.settings.has(message.guild.id)) {
client.settings.set(message.guild.id, {});
}
var modRole = message.guild.roles.cache.get(settings.modRole)
if (!args[0]) {
if(!modRole) {
return message.channel.send(
"<:error:466995152976871434> There is no mod role set for this server. Please set one using `" + message.settings.prefix + "modrole <role>`"
)
} else {
message.channel.send(`The current mod role is: \`${modRole.name}\``)
}
} else {
const joinedValue = args.join(" ");
if (joinedValue.length < 1) {
return message.channel.send(
`<:error:466995152976871434> You didn't specify a role. Usage: \`${client.commands.get(`modrole`).help.usage}\``
);
};
if (settings.modRole != "None set" && joinedValue === modRole.name) {
return message.channel.send(
"<:error:466995152976871434> The mod role is already set to that!"
);
};
let role = client.findRole(joinedValue, message);
if (!role) {
return message.channel.send(`<:error:466995152976871434> That role doesn't seem to exist. Try again!`);
};
client.settings.set(message.guild.id, role.id, "modRole");
message.channel.send(
`<:success:466995111885144095> The mod role has been set to \`${role.name}\`
`);
};
};
exports.conf = {
enabled: true,
guildOnly: true,
aliases: [],
permLevel: "Administrator",
requiredPerms: []
};
exports.help = {
name: "modrole",
category: "Configure",
description: "Sets the mod role for this server.",
usage: "modrole <role>"
};

View file

@ -1,26 +1,8 @@
// Copyright 2020 Emily J. / mudkipscience and contributors. Subject to the AGPLv3 license.
const { getGuild } = require('../modules/music')
const Discord = require("discord.js")
exports.conf = {
enabled: true,
guildOnly: true,
aliases: [],
permLevel: 'User',
requiredPerms: ['CONNECT', 'SPEAK'],
cooldown: 2000
}
exports.help = {
name: 'movehere',
category: 'Music',
description: 'Moves music related messages to the channel the this command is ran in.',
usage: 'movehere',
parameters: ''
}
const music = require('../utils/music')
exports.run = async (client, message, args, level, data) => {
// get guild music data
const guild = music.getGuild(message.guild.id)
module.exports.run = async (client, message, args, level) =>{
const guild = getGuild(message.guild.id)
if (!guild.playing) {
return message.channel.send('<:error:466995152976871434> Nothing is playing.')
@ -34,3 +16,18 @@ exports.run = async (client, message, args, level, data) => {
message.channel.send('<:success:466995111885144095> Music messages will now be sent to this channel.')
}
exports.conf = {
enabled: true,
guildOnly: true,
aliases: [],
permLevel: "Moderator",
requiredPerms: []
};
exports.help = {
name: 'movehere',
category: 'Music',
description: 'Moves music related messages to the channel the this command is ran in.',
usage: 'movehere',
};

View file

@ -1,24 +1,5 @@
// Copyright 2020 Emily J. / mudkipscience and contributors. Subject to the AGPLv3 license.
exports.conf = {
enabled: true,
guildOnly: true,
aliases: [],
permLevel: 'User',
requiredPerms: [],
cooldown: 2000
}
exports.help = {
name: 'movesong',
category: 'Music',
description: 'Moves a song to a new position in the queue.',
usage: 'movesong [current position] [new position]',
parameters: '[current position] - The current position of the song you want to move'
}
const { getGuild } = require('../utils/music')
module.exports.run = (client, message, args, level) => {
const { getGuild } = require('../modules/music')
exports.run = async (client, message, args) => {
const queue = getGuild(message.guild.id).queue
if (queue.length < 3) {
@ -58,3 +39,18 @@ module.exports.run = (client, message, args, level) => {
message.channel.send(`<:success:466995111885144095> Moved **${songName}** from position \`${oldPosition}\` to \`${newPosition}\``)
}
exports.conf = {
enabled: true,
guildOnly: true,
aliases: [],
permLevel: "Moderator",
requiredPerms: []
}
exports.help = {
name: 'movesong',
category: 'Music',
description: 'Moves a song to a new position in the queue.',
usage: 'movesong [current position] [new position]'
}

39
src/commands/msearch.js Normal file
View file

@ -0,0 +1,39 @@
exports.run = (client, message, args) => {
if (!args[0])
return message.channel.send(
`<:error:466995152976871434> No username provided. Usage: \`${client.commands.get(`msearch`).help.usage}\``
);
var mlist = "";
var count = 0;
client.searchForMembers(message.guild, args[0]).forEach((member) => {
if (member) {
mlist += `\`${member.user.tag}\``;
count = count + 1;
}
mlist += "**, **";
});
mlist = mlist.substring(0, mlist.length - 6);
var mlist1 = `Found ${count} users:\n` + mlist;
if (!mlist1) {
return message.channel.send("<:error:466995152976871434> No users found!");
}
message.channel.send(mlist1);
};
exports.conf = {
enabled: true,
guildOnly: true,
aliases: [],
permLevel: "User",
requiredPerms: []
};
exports.help = {
name: "msearch",
category: "Utility",
description: "Search for server members.",
usage: "msearch [user]"
};

114
src/commands/mute.js Normal file
View file

@ -0,0 +1,114 @@
exports.run = async (client, message, [args, ...reason], level) => {
const settings = message.settings;
if(!args) {
return message.channel.send("<:error:466995152976871434> Who am I meant to mute?")
}
let user = message.mentions.members.first();
let users;
if (!user) {
users = client.searchForMembers(message.guild, args);
if (users.length > 1)
return message.channel.send(
"<:error:466995152976871434> Found multiple users! Please be more specific or mention the user instead."
);
else if (users.length == 0)
return message.channel.send(
"<:error:466995152976871434> That user doesn't seem to exist. Try again!"
);
user = users[0];
};
if (user.user.id === message.guild.ownerID) {
return message.channel.send("<:error:466995152976871434> You can't mute the owner!")
};
let moderator = message.guild.member(message.author)
if (message.settings.mutedRole.position >= moderator.roles.highest.position && level < 2) {
return message.channel.send(
"<:error:466995152976871434> The muted role is positioned above the moderator role! Please move the muted role below the moderator role."
);
};
if (user.roles.highest.position >= moderator.roles.highest.position && moderator.user.id !== message.guild.ownerID) {
return message.channel.send(
`<:error:466995152976871434> You can't mute people who have a higher role than you!`
);
};
let bot = message.guild.member(client.user)
if (user.roles.highest.position >= bot.roles.highest.position) {
return message.channel.send(
`<:error:466995152976871434> I can't mute people who have a higher role than me!`
);
}
var role = message.guild.roles.cache.get(settings.mutedRole);
if (!role) {
return message.channel.send(
"<:error:466995152976871434> There is no muted role set for this server. Please set one using `" + message.settings.prefix + "mutedrole <role>` before using this command."
);
};
if (bot.roles.highest.position <= role.position) {
return message.channel.send(
"<:error:466995152976871434> The muted role is above my highest role! Please move the muted role below my highest role."
);
};
message.guild.channels.cache.forEach(async (channel, id) => {
await channel.updateOverwrite(role, {
SEND_MESSAGES: false,
ADD_REACTIONS: false
});
});
if (user.roles.cache.has(role.id)) {
return message.channel.send("<:error:466995152976871434> They're already muted!")
}
await user.roles.add(role.id);
message.channel.send(`<:success:466995111885144095> Muted \`${user.user.tag}\``)
var muteReason = reason.join(" ");
if(muteReason.length == 0) {
muteReason = "**No reason provided.**"
}
if (settings.modlogsChannel !== "off") {
const channel = message.guild.channels.cache.find(
channel => channel.name === settings.modlogsChannel
);
if (channel) {
let embed = new Discord.MessageEmbed();
embed.setColor("#a652bb");
embed.setAuthor("User muted!", user.user.avatarURL({format: "png", dynamic: true, size: 2048}));
embed.setDescription(
`• User: ${user} (${user.user.id})\n• Mod: ${message.author} (${message.author.id})\n• Reason: ${muteReason}`
);
try {
channel.send(embed);
} catch (err) {
// probably no permissions to send messages/embeds there
}
}
}
};
exports.conf = {
enabled: true,
guildOnly: true,
aliases: [],
permLevel: "Moderator",
requiredPerms: ["MANAGE_ROLES", "MANAGE_CHANNELS"]
};
exports.help = {
name: "mute",
category: "Moderation",
description: "Prevents the specified user from typing.",
usage: "mute [member] <reason>"
};

Some files were not shown because too many files have changed in this diff Show more