Compare commits

...

171 Commits
master ... next

Author SHA1 Message Date
Lukáš H 6ff02d7cae
discordapp.com -> discord.com 2020-05-04 22:04:04 +02:00
Emily 5c6938369d polish 2020-04-29 21:21:34 +10:00
Emily a31dc02568 begin polishing up music modules 2020-04-29 21:00:11 +10:00
Emily caeeafa3bb update music to support playnext 2020-04-29 20:59:58 +10:00
Emily cfcdf359f5 added playnext 2020-04-29 20:59:35 +10:00
Emily 962c135724 delete defaultvolume.js 2020-04-29 20:59:21 +10:00
Emily 16f540de81 fixed autoclear 2020-04-29 20:59:08 +10:00
Emily fb31e369f8 a 2020-04-28 19:35:11 +10:00
Emily 5769195df9 Merge branch 'next' of https://github.com/mudkipscience/woomy into next 2020-04-26 18:04:22 +10:00
Emily 828a030070 stuff 2020-04-26 18:04:19 +10:00
amber d8b02fe9c5
a word 2020-04-24 20:07:49 +01:00
amber e73301f87d
fixing style + an error 2020-04-24 20:06:17 +01:00
Emily 9ab8731f90 Merge branch 'next' of https://github.com/mudkipscience/woomy into next 2020-04-24 17:51:00 +10:00
Emily 1f73cf351f more music stuff 2020-04-24 17:50:54 +10:00
Lukáš H 8ed2c5948f
part of movehere 2020-04-23 17:15:48 +02:00
Lukáš H 78aab0f9f6
auto-update config prepartion 2020-04-22 18:04:44 +02:00
Lukáš H a048d94cd0
replace missing config values from config template 2020-04-22 18:00:52 +02:00
Lukáš H ecb9004ec8
fix volume displaying actual volume instead of user volume 2020-04-22 17:55:10 +02:00
Lukáš H 8373194feb
do not hardcode 8ball responses 2020-04-22 17:53:12 +02:00
Lukáš H 2f5534524d
restart command 2020-04-22 17:43:23 +02:00
Emily 7a3035e00b Merge branch 'next' of https://www.github.com/mudkipscience/woomy into next 2020-04-22 22:57:25 +10:00
Emily 6ea766ed1d reordered functions 2020-04-22 22:57:22 +10:00
Emily 888a2fc6ef removed useless stuff 2020-04-22 19:30:19 +10:00
Emily be16d511e2 being force-disconnected from vc no longer breaks 2020-04-22 19:18:14 +10:00
Emily 98612a7784 fixed music 2020-04-22 19:00:57 +10:00
Emily 6ee9122442 linter is mean 2020-04-22 18:00:19 +10:00
Emily 7c10c5309f fixed formatting 2020-04-22 17:58:25 +10:00
Lukáš H 13254e47ac Merge branch 'next' of github.com:mudkipscience/woomy into next 2020-04-22 09:53:57 +02:00
Lukáš H 3956eb6fae
fix 2020-04-22 09:53:55 +02:00
Emily da617ce62b Merge branch 'next' of https://github.com/mudkipscience/woomy into next 2020-04-22 17:53:45 +10:00
Emily 3dd36604e5 songName no longer causes problems 2020-04-22 17:53:41 +10:00
Lukáš H e7ed288139
Leave if no one is listening 2020-04-22 09:49:45 +02:00
Lukáš H 69815dbdf2
voice chat leave detection 2020-04-22 09:39:46 +02:00
Emily 4d97bc1ad0 shuffle command now excluses the first element 2020-04-22 16:54:55 +10:00
Emily 6d5d476528 music stuff, added reload 2020-04-22 14:50:00 +10:00
Emily c968292338 added movesong and shuffle, will improve on them 2020-04-22 01:05:33 +10:00
Emily 5d2e02221b music stuff 2020-04-21 19:14:49 +10:00
Emily 3a8e2a8840 replaced some stuff 2020-04-21 17:04:21 +10:00
Emily 24cfe07310 fixed voteskip, added autoplay to guild schema 2020-04-21 17:01:28 +10:00
Emily b7d2792bfc
Update README.md 2020-04-20 09:43:29 +00:00
Emily cb26ce0989 did stuff but voteskip is broken (line 51) 2020-04-20 19:42:47 +10:00
Emily 39fa428614 porting over music commands 2020-04-20 19:19:32 +10:00
Emily 4d02b3bc7e this annoyed me 2020-04-20 14:53:59 +10:00
Emily eeea371762 updated copyright notices 2020-04-20 14:52:50 +10:00
Emily f04f6c842f please stop stealing my code 2020-04-20 13:02:10 +10:00
Emily 3e8c73f90a add avatar 2020-04-20 12:47:56 +10:00
Emily adb222c154 added badges 2020-04-20 12:45:50 +10:00
Emily 333c6299dd b 2020-04-20 12:35:17 +10:00
Emily de895af2a9 bernie sander 2020-04-20 12:11:26 +10:00
Emily bd00d0a05c working on a new readme 2020-04-20 12:09:46 +10:00
FLGX cd989caa93
Merge pull request #16 from purpleempress/next
remove unused yt api field, add config option for invidious host, devmode update
2020-04-19 19:37:02 +02:00
amber f9be263203
devmode update 2020-04-19 18:35:09 +01:00
amber dd04b04500
don't hardcode invidious url, add default to configtemplate 2020-04-19 18:17:37 +01:00
amber 39aa33d669
remove unused yt api key field from config 2020-04-19 16:54:43 +01:00
Emily e4f58c0e4c
Merge pull request #15 from purpleempress/patch-1
Update LICENSE to AGPL
2020-04-19 13:21:16 +00:00
amber 885bc6ccc0
Update LICENSE to AGPL 2020-04-19 13:20:34 +00:00
Emily 4ff85905ff changed music up 2020-04-19 20:10:52 +10:00
Emily 93926545ae a 2020-04-19 18:56:12 +10:00
Emily 5440ae0daa got rid of my shitty timestamp generator 2020-04-19 17:24:31 +10:00
Emily 1760fbcda1 music is fixed, it just needs polish now ^^ 2020-04-19 17:08:37 +10:00
Emily abab09546c removed fatal level 2020-04-19 00:23:50 +10:00
Emily 9bd67779ec switched to a faster invidious instance 2020-04-19 00:14:54 +10:00
Emily 31ce5b28b2 sans undertale 2020-04-19 00:14:37 +10:00
Emily 3ab6dbfea9 update deps 2020-04-19 00:14:23 +10:00
Emily dc279467d5 winston was borked 2020-04-19 00:14:11 +10:00
Emily 047b0be769 disable sentry for now 2020-04-18 17:54:01 +10:00
Emily 33f76c959a resorted _functions 2020-04-18 17:52:42 +10:00
Emily bb2239bda1 update .gitignore 2020-04-18 17:31:33 +10:00
Emily 293d473a78 move from tracer to winston for logging 2020-04-18 17:31:17 +10:00
Emily 2958652eff rename helpers utils 2020-04-18 17:30:59 +10:00
Emily 9b58684c16 update dependencies 2020-04-18 17:30:23 +10:00
Emily 82c86fa9b2 ship no longer breaks for numbers higher than 98 2020-04-17 17:06:48 +10:00
Emily 6487f20b70 google blocked my IP lmao 2020-04-15 15:43:31 +10:00
Lukáš Horáček bb5b7edbb4
remove blank lines 2020-04-14 15:13:00 +02:00
Lukáš Horáček 4eca40d2de
fix music 2020-04-14 15:11:35 +02:00
Emily 6748f1fb03 playing from links *kinda* works now 2020-04-14 19:44:02 +10:00
Emily 5dfbbb8e53 update dependencies 2020-04-14 16:16:38 +10:00
Emily e146a324e9 delete data folder 2020-04-14 16:06:09 +10:00
Emily dad836e630 (WIP) fredboat style selection menu for music 2020-04-14 15:28:25 +10:00
Emily b36a746bb4 Added some stuff, changed how usererrs are called 2020-04-13 19:29:47 +10:00
Emily 9fd2c873ca fix code format 2020-04-13 14:28:53 +10:00
Lukáš Horáček a067c957c1
remove comments from music 2020-04-12 11:33:56 +02:00
Lukáš Horáček 217e8a07e2
remove youtube-info 2020-04-12 11:33:14 +02:00
Lukáš Horáček 1e50f81b65 Merge branch 'next' of github.com:mudkipscience/woomy into next 2020-04-12 11:32:01 +02:00
Lukáš Horáček bc61253348
change leave to disconnect 2020-04-12 11:31:58 +02:00
Lukáš Horáček cc1d4bebb8
change volume to moderator 2020-04-12 11:31:52 +02:00
TheCakeChicken d484ecd9c1 Merge branch 'next' of github.com:mudkipscience/Woomy into next 2020-04-12 10:28:34 +01:00
TheCakeChicken e270ddeaa0 sentry 2020-04-12 10:28:31 +01:00
Lukáš Horáček a7df119261 Merge branch 'next' of github.com:mudkipscience/woomy into next 2020-04-12 11:25:01 +02:00
Lukáš Horáček 818a923a37
forceskip 2020-04-12 11:24:58 +02:00
Emily 0c98c5b803 Merge branch 'next' of https://github.com/mudkipscience/woomy into next 2020-04-12 19:24:17 +10:00
Emily 0de96409a0 i fucking hate family time 2020-04-12 19:24:14 +10:00
Lukáš Horáček 8e850b1adf
fix joinArguments conf 2020-04-12 11:22:28 +02:00
Lukáš Horáček fe5a9ccdc2
add joinArguments conf 2020-04-12 11:21:38 +02:00
Emily 798c308856 Merge branch 'next' of https://github.com/mudkipscience/woomy into next 2020-04-12 19:15:36 +10:00
Emily bfde321b3e Finally decided on a help command I like 2020-04-12 19:15:31 +10:00
Lukáš Horáček d85a10c7d0
queue 2020-04-12 11:07:01 +02:00
Lukáš Horáček 89dc88d786
fix music being skipped while playing 2020-04-12 10:48:47 +02:00
Lukáš Horáček 8325891854
default to 50% user volume 2020-04-12 10:47:48 +02:00
Lukáš Horáček b254495fd3
make 50% volume of video max/default 2020-04-12 10:39:41 +02:00
Lukáš Horáček aedce9fc34
youtube link workaround 2020-04-11 16:46:17 +02:00
Lukáš Horáček cfbce016b9
volume 2020-04-11 16:45:47 +02:00
Lukáš Horáček 8b16fba69a
guild only play 2020-04-11 16:40:35 +02:00
Lukáš Horáček 7743bf6ef4
music stuff again 2020-04-11 16:37:45 +02:00
Lukáš Horáček 7340ef1af3
set volume to 25 2020-04-11 16:31:19 +02:00
Lukáš Horáček 079bcd50a1
music stuff 2020-04-11 16:30:08 +02:00
Lukáš Horáček 5ae1ede3f3
search for videos only using youtube api 2020-04-11 16:18:42 +02:00
Lukáš Horáček b5f7c70050
muuusiccc 2020-04-11 16:09:48 +02:00
Lukáš Horáček 2511f6fd87
opus 2020-04-11 16:08:41 +02:00
Emily ba0448c905 Did lots of things 2020-04-11 19:30:51 +10:00
Emily 2e85c85d3c idk 2020-04-10 19:29:08 +10:00
Emily 956f4132c7 Added pride and stuff 2020-04-10 12:57:04 +10:00
Lukáš Horáček 1b013581de
music 2020-04-09 09:54:18 +02:00
Lukáš Horáček 019b8a03e4
use strict + login error handling 2020-04-09 09:06:12 +02:00
Lukáš Horáček 33821715f2
fix support 2020-04-09 09:05:44 +02:00
Lukáš Horáček cba41dfab4
add log to gitignore 2020-04-08 21:53:29 +02:00
Lukáš Horáček 00f3280cdc
remove file.log 2020-04-08 21:53:17 +02:00
Lukáš Horáček 82985b957a
readd avatar command 2020-04-08 21:52:20 +02:00
Lukáš Horáček 46b81f9c60
readd support command 2020-04-08 21:48:53 +02:00
Lukáš Horáček ae0240ef47
emoji replace " with ' 2020-04-08 21:47:56 +02:00
Lukáš Horáček 7fa12b105d
add botName 2020-04-08 21:47:46 +02:00
Lukáš Horáček 2962de2931
readd emoji 2020-04-08 21:44:55 +02:00
Emily 1a6cd52d06 sans 2020-04-09 00:09:55 +10:00
Emily da1ca8f986 sans 2020-04-08 19:30:17 +10:00
Emily 124ee4b0a6 Merge branch 'next' of https://github.com/mudkipscience/woomy into next 2020-04-08 18:12:07 +10:00
Emily 59d8836427 updated ship and functions 2020-04-08 18:12:01 +10:00
Lukáš Horáček 491751a58b
gitignore & data placeholder 2020-04-08 09:43:45 +02:00
Emily 0ac043371f stiff 2020-04-07 18:10:01 +10:00
Emily 1b9c4c900a fixed help 2020-04-07 02:35:06 +10:00
Emily 3b8234fea7 help command (unfinished) 2020-04-06 19:36:32 +10:00
Emily b2531d49b0 Reformatted stuff, added data to imports 2020-04-06 15:54:45 +10:00
Emily 95d84cfaef random 2020-04-06 15:54:09 +10:00
Emily cdddb4d11d combined getGuild & createGuild, added user funcs 2020-04-06 15:53:41 +10:00
Emily da505f8554 IM FUCKING STUPID LOL 2020-04-05 18:48:15 +10:00
Emily a94671dc06 fgdshhf 2020-04-05 02:13:18 +10:00
Emily 4b66acc01d Perm levels fixed, guild create/delete 2020-04-04 20:16:05 +11:00
Emily a82c054ce3 Mongo works, added new events 2020-04-04 17:59:22 +11:00
Emily 187835991e idk 2020-04-04 01:55:35 +11:00
Emily 123f5c9c11 Added back all the missing functions 2020-04-03 19:31:48 +11:00
Emily 02e570eb00 adfghjfx 2020-04-03 17:26:16 +11:00
Emily 1f267e1cfb Added configTemplate.js, fixed .gitignore 2020-04-03 11:35:54 +11:00
Emily 559b86261f gitignore work please 2020-04-03 11:16:43 +11:00
Emily 529744f5d5 maybe we can just check everything in config 2020-04-03 11:07:51 +11:00
Emily 19e8c4e744 did stuff 2020-04-02 19:24:36 +11:00
Emily 5d42b0c602 Sync changes 2020-04-02 19:17:42 +11:00
Emily db57128ebf Did stuff 2020-04-01 19:33:02 +11:00
Emily 8b7eb29866 Added dev mode 2020-04-01 03:37:17 +11:00
Emily c0111e0943 Synced changes 2020-04-01 02:45:45 +11:00
Lukáš Horáček 93abdb367d Merge branch 'next' of github.com:mudkipscience/woomy into next 2020-03-31 13:46:49 +02:00
Lukáš Horáček 9f02a5956b
fix music 2020-03-31 13:46:46 +02:00
Emily 8e47423cbc Update index.js 2020-03-31 22:46:10 +11:00
Emily 0f2f8b0318 Merge branch 'next' of https://www.github.com/mudkipscience/woomy into next 2020-03-31 22:43:58 +11:00
Lukáš Horáček 709cf975cb
packages 2020-03-31 13:42:08 +02:00
Lukáš Horáček c570f549e5
changes 2020-03-31 13:40:51 +02:00
Lukáš Horáček 9180cf1d17
update package lock i guess 2020-03-31 13:38:01 +02:00
Emily 4a36da8d27 fixed index.js 2020-03-31 22:36:35 +11:00
Lukáš Horáček 204977952d
error handling for events & commands 2020-03-31 13:36:17 +02:00
Lukáš Horáček a78e759ba9
comments 2020-03-31 13:33:32 +02:00
Emily 2b6ac43e9b Did lots of unfinished stuff 2020-03-31 19:24:51 +11:00
Emily 10a0a7aca7 did stuff 2020-03-31 18:59:09 +11:00
Emily 57fb111d3b did logging stuff 2020-03-31 15:09:50 +11:00
Emily 8db6ff539f
Delete dashboard maybe?.txt 2020-03-31 00:25:29 +00:00
Emily 36d363271b awsredtyguil 2020-03-31 03:01:13 +11:00
Lukáš Horáček d722add09b
More comments and also comment stuff out 2020-03-30 10:52:08 +02:00
Lukáš Horáček 9a71454ec5
Add comments, basic initialization function to the core 2020-03-30 10:47:55 +02:00
Lukáš Horáček f6f0ad7a94
package-lock.json changes? 2020-03-30 10:46:56 +02:00
Lukáš Horáček e17877548c
Testing ready event 2020-03-30 10:46:36 +02:00
Lukáš Horáček 07d760e066
Move files to their correct locations 2020-03-30 10:40:45 +02:00
Lukáš Horáček 589676eab1
add data to gitignore 2020-03-30 10:25:02 +02:00
Emily 60e27f40ad First commit woo 2020-03-29 18:45:09 +11:00
Emily ff80053d17 bye lol 2020-03-29 17:29:53 +11:00
176 changed files with 6790 additions and 6277 deletions

18
.eslintrc.js Normal file
View File

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

7
.gitignore vendored
View File

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

661
LICENSE Normal file
View File

@ -0,0 +1,661 @@
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/>.

View File

@ -1,22 +0,0 @@
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,21 +1,37 @@
# 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.
![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)
# How to use
The easiest way to use Woomy is to invite it to your server with [this link.](https://discordapp.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.
## A feature-rich and configurable Discord bot for music, moderation, currency and more!
You can also self-host! Some modificatiomns 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
**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)
# Requirements
- git
- node.js v12.0.0 or higher
- node-gyp build tools
- ffmpeg (or ffmpeg-static)
## Using 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
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.
# Contributing
If you wish to contribute to Woomy, please fork the repository and open a pull request. Any contribution is appreciated <3
## Contributors
Thanks to the following people who have contributed to Woomy:
* [@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.

View File

Before

Width:  |  Height:  |  Size: 99 KiB

After

Width:  |  Height:  |  Size: 99 KiB

View File

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

14
assets/json/8ball.json Normal file
View File

@ -0,0 +1,14 @@
{
"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

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

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)"
}
}

13
changelog.txt Normal file
View File

@ -0,0 +1,13 @@
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

20
commandTemplate.js Normal file
View File

@ -0,0 +1,20 @@
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
}

25
commands/8ball.js Normal file
View File

@ -0,0 +1,25 @@
// 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
}

43
commands/emoji.js Normal file
View File

@ -0,0 +1,43 @@
// 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)
}

52
commands/eval.js Normal file
View File

@ -0,0 +1,52 @@
// 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('⚠️')
}
}

103
commands/help.js Normal file
View File

@ -0,0 +1,103 @@
// 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)
}
}

22
commands/invite.js Normal file
View File

@ -0,0 +1,22 @@
// 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>`)
}

27
commands/level.js Normal file
View File

@ -0,0 +1,27 @@
// 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()
}
}

36
commands/movehere.js Normal file
View File

@ -0,0 +1,36 @@
// 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: 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)
if (!guild.playing) {
return message.channel.send('<:error:466995152976871434> Nothing is playing.')
}
if (guild.channel.id === message.channel.id) {
return message.channel.send('<:error:466995152976871434> Music messages are already being sent to this channel.')
}
guild.channel = message.channel
message.channel.send('<:success:466995111885144095> Music messages will now be sent to this channel.')
}

60
commands/movesong.js Normal file
View File

@ -0,0 +1,60 @@
// 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 queue = getGuild(message.guild.id).queue
if (queue.length < 3) {
return message.channel.send('<:error:466995152976871434> Not enough songs are in the queue for this command to work!')
}
if (!args[0]) {
return client.userError(message, exports, 'Missing argument, the `current position` argument is required!')
}
if (!args[1]) {
return client.userError(message, exports, 'Missing argument, the `new position` argument is required!')
}
const oldPosition = +args[0]
const newPosition = +args[1]
if (isNaN(oldPosition) === true) {
return message.channel.send('<:error:466995152976871434> That isn\'t a number! You need to tell me the songs position in the queue (1, 2, etc.)')
}
if (isNaN(newPosition) === true) {
return message.channel.send('<:error:466995152976871434> That isn\'t a number! You need to tell me the songs position in the queue (1, 2, etc.)')
}
if (oldPosition < 1 || oldPosition >= queue.length) {
return message.channel.send('<:error:466995152976871434> Old position is not a valid song ID.')
}
if (newPosition < 1 || newPosition >= queue.length) {
return message.channel.send('<:error:466995152976871434> New position is not a valid song ID.')
}
const songName = queue[oldPosition].video.title
queue.splice(newPosition, 0, queue.splice(oldPosition, 1)[0])
message.channel.send(`<:success:466995111885144095> Moved **${songName}** from position \`${oldPosition}\` to \`${newPosition}\``)
}

36
commands/myprefix.js Normal file
View File

@ -0,0 +1,36 @@
// 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}\``)
}

47
commands/nowplaying.js Normal file
View File

@ -0,0 +1,47 @@
// Copyright 2020 Emily J. / mudkipscience and contributors. Subject to the AGPLv3 license.
exports.conf = {
enabled: true,
guildOnly: true,
aliases: ['np'],
permLevel: 'User',
requiredPerms: ['EMBED_LINKS'],
cooldown: 2000
}
exports.help = {
name: 'nowplaying',
category: 'Music',
description: 'Gives details on the song that is currently playing',
usage: 'nowplaying',
parameters: ''
}
const { getGuild, createTimestamp } = require('../utils/music')
const { MessageEmbed } = require('discord.js')
exports.run = async (client, message, args, level, data) => {
const guild = getGuild(message.guild.id)
if (guild.queue.length < 1) {
return message.channel.send(client.config.emojis.error + ' Nothing is in the queue!')
}
const s = guild.queue[0]
const elapsedTime = createTimestamp(guild.dispatcher.streamTime / 1000)
let timestamp = `\`[${createTimestamp(s.video.lengthSeconds)}]\``
if (timestamp !== '`[LIVE]`') {
timestamp = `\`[${elapsedTime + '/' + createTimestamp(s.video.lengthSeconds)}]\``
}
const embed = new MessageEmbed()
embed.setTitle('Now playing')
embed.setThumbnail(s.video.videoThumbnails[1].url)
embed.setColor(client.embedColour(message.guild))
embed.setDescription(`**[${s.video.title}](https://www.youtube.com/watch?v=${s.video.videoId})**`)
embed.addField('Channel:', s.video.author, true)
embed.addField('Time:', timestamp, true)
embed.setFooter('Requested by ' + s.requestedBy.tag, s.requestedBy.avatarURL({ format: 'png', dynamic: true, size: 2048 }))
message.channel.send(embed)
}

37
commands/pause.js Normal file
View File

@ -0,0 +1,37 @@
// 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: 'pause',
category: 'Music',
description: 'Pauses the music that is currently playing.',
usage: 'pause',
parameters: ''
}
const { getGuild } = require('../utils/music')
exports.run = async (client, message, args, level, data) => {
const guild = getGuild(message.guild.id)
if (guild.paused === true) {
return message.channel.send('<:error:466995152976871434> The music has already been paused! Run resume to start the music again.')
}
if (guild.queue.length < 1 || guild.playing === false) {
return message.channel.send('<:error:466995152976871434> Nothing is playing!')
}
guild.playing = false
guild.paused = true
guild.dispatcher.pause()
message.channel.send('<:pause:467639357961142273> Music playback has been paused.')
}

25
commands/ping.js Normal file
View File

@ -0,0 +1,25 @@
// 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\`)`
)
}

23
commands/play.js Normal file
View File

@ -0,0 +1,23 @@
// 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)
}

23
commands/playnext.js Normal file
View File

@ -0,0 +1,23 @@
// 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)
}

36
commands/prefix.js Normal file
View File

@ -0,0 +1,36 @@
// 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}\``)
}

50
commands/pride.js Normal file
View File

@ -0,0 +1,50 @@
// Copyright 2020 Emily J. / mudkipscience and contributors. Subject to the AGPLv3 license.
exports.conf = {
enabled: true,
guildOnly: false,
aliases: [],
permLevel: 'User',
requiredPerms: ['ATTACH_FILES'],
cooldown: 15000
}
exports.help = {
name: 'pride',
category: 'Fun',
description: 'Adds a pride flag ring to your avatar. Available flags are lesbian, gay, bisexual, pansexual, trans, asexual, aromantic and ally.',
usage: '`pride [flag]` - Adds a pride flag overlay to your avatar.\n`pride -g [flag]` - Adds a pride flag gradient on your avatar.',
parameters: '`flag` - What flag you want to add to your avatar (options listed above)\n`-g` - Add this to the start of the command to turn the flag into a gradient.'
}
const url = 'https://demirramon.com/gen/pride.png'
const Discord = require('discord.js')
exports.run = (client, message, args) => {
const flag = args[0]
if (!flag) {
return client.userError(message, exports, 'Missing argument, the `flag` argument is required!')
}
const available = ['lesbian', 'gay', 'bisexual', 'pansexual', 'trans', 'asexual', 'aromantic', 'ally']
if (!available.includes(flag.toLowerCase())) {
return message.channel.send(`This flag isn't available, sorry ;~;\nAvailable flags: \`${available.join('`, `')}\``)
}
let gradient = 'false'
if (message.flags.includes('g')) {
gradient = 'true'
}
message.channel.startTyping()
const params = `image=${message.author.avatarURL({ format: 'png', size: 2048 })}&flag=${flag.toLowerCase()}&full=true&gradient=${gradient}&background=false&fit=true&v=2019-08-07`
try {
message.channel.stopTyping()
message.channel.send({ files: [new Discord.MessageAttachment(url + '?' + params)] })
} catch (err) {
message.channel.stopTyping()
message.channel.send(`<:error:466995152976871434> Error when generating image: \`${err}\``)
}
}

178
commands/queue.js Normal file
View File

@ -0,0 +1,178 @@
// Copyright 2020 Emily J. / mudkipscience and contributors. Subject to the AGPLv3 license.
'use strict'
exports.conf = {
enabled: true,
guildOnly: true,
aliases: [],
permLevel: 'User',
requiredPerms: [],
cooldown: 2000
}
exports.help = {
name: 'queue',
category: 'Music',
description: 'Lists all songs that have been queued.',
usage: 'queue <page>',
parameters: ''
}
const { getGuild, createTimestamp } = require('../utils/music')
const Discord = require('discord.js')
exports.run = (client, message, args) => {
var queue = getGuild(message.guild.id).queue
if (queue.length < 1) {
return message.channel.send('<:error:466995152976871434> Nothing is playing.')
}
const lists = []
function generateList (start, number) {
let list = ''
let timestamp
if (start === 1 && queue.length === 1) {
return ['There\'s nothing else waiting to be played!', 1]
}
if (number === 1 && queue.length + 1 < start) {
return false
}
const q = queue.slice(start)
let i = 0
for (i = 0; i < q.length; i++) {
const song = q[i]
timestamp = createTimestamp(song.video.lengthSeconds)
const aaa = list + `\`${(i + 1) + start - 1}:\` **[${song.video.title}](https://www.youtube.com/watch?v=${song.video.videoId})** added by ${song.requestedBy} \`[${timestamp}]\`\n`
if (aaa.length > 1024) {
return [list, start + i - 1]
} else {
list = aaa
}
// totalDuration = totalDuration + song.duration
}
return [list, start + i + 1]
}
const songsInQueue = queue.length - 1
let songsInQueueEnglish = 'song'
function generatePage (list, page) {
if (!list || list === '') {
return false
}
var embed = new Discord.MessageEmbed()
embed.setTitle(`Queue for: ${message.guild.name}`)
embed.setColor(client.embedColour(message.guild))
var elapsedTime = getGuild(message.guild.id).dispatcher.streamTime / 1000
var totalDuration = queue[0].video.lengthSeconds - elapsedTime
let timeRemaining = ''
for (let i = 1; i < queue.length; i++) {
const b = queue[i]
if (b.video.lengthSeconds === 0) {
timeRemaining = '∞'
break
}
totalDuration += b.video.lengthSeconds
}
if (timeRemaining === '') {
const queueDuration = createTimestamp(totalDuration)
timeRemaining = queueDuration
}
let timestamp = `\`${createTimestamp(queue[0].video.lengthSeconds)}\``
if (timestamp !== '`[LIVE]`') {
timestamp = `\`[${createTimestamp(elapsedTime) + '/' + createTimestamp(queue[0].video.lengthSeconds)}]\``
}
embed.addField('Now playing:', `**[${queue[0].video.title}](https://www.youtube.com/watch?v=${queue[0].video.videoId})** added by ${queue[0].requestedBy} ${timestamp}`)
embed.addField('Up next:', list)
if (songsInQueue > 1 || songsInQueue === 0) {
songsInQueueEnglish = 'songs'
}
embed.setFooter(`Page ${page}/${lists.length} | ${songsInQueue + ' ' + songsInQueueEnglish} in queue | ${timeRemaining} time remaining`)
return embed
}
var myMessage = null
function displayPage (number) {
const page = generatePage(lists[number - 1], number)
if (page) {
if (myMessage) {
myMessage.edit(page)
} else {
myMessage = message.channel.send(page)
}
return true
} else {
return false
}
}
function aFunction (start) {
// start - index of song, which we should start with
// end - index of song, which we ended with
const [list, end] = generateList(start, lists.length + 1)
if (list && list !== '') {
lists.push(list)
if (queue[end + 1]) {
aFunction(end + 1)
}
}
}
aFunction(1)
let page = 1
if (args[0]) {
const userPage = Number(args[0])
if (userPage) {
page = userPage
} else {
return message.channel.send(
`<:error:466995152976871434> Invalid page. Usage: \`${client.commands.get('queue').help.usage}\``
)
}
}
if (displayPage(page)) {
} else {
return message.channel.send(
`<:error:466995152976871434> Page ${page} doesn't exist!`
)
}
}

32
commands/reload.js Normal file
View File

@ -0,0 +1,32 @@
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!`)
}

47
commands/removesong.js Normal file
View File

@ -0,0 +1,47 @@
// 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: 'removesong',
category: 'Music',
description: 'Removes a song from the queue.',
usage: 'removesong [position]',
parameters: '[position] - The position of the song you want to remove'
}
const { getGuild } = require('../utils/music')
module.exports.run = (client, message, args, level) => {
var queue = getGuild(message.guild.id).queue
if (queue.length < 2) {
return message.channel.send('<:error:466995152976871434> Not enough songs are in the queue for this command to work!')
}
if (!args[0]) {
return message.channel.send(`<:error:466995152976871434> You didn't tell me what song to remove! Usage: \`${client.commands.get('removesong').help.usage}\``)
}
var input = +args[0]
if (isNaN(input) === true) {
return message.channel.send('<:error:466995152976871434> That isn\'t a number! You need to tell me the songs position in the queue (1, 2, etc.)')
}
if (input >= queue.length || input < 1) {
return message.channel.send('<:error:466995152976871434> Input is not a valid song ID.')
}
var songName = queue[input].video.title
queue.splice(input, 1)
message.channel.send(`<:success:466995111885144095> Removed from queue: **${songName}**`)
}

30
commands/restart.js Normal file
View File

@ -0,0 +1,30 @@
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)
}

37
commands/resume.js Normal file
View File

@ -0,0 +1,37 @@
// Copyright 2020 Emily J. / mudkipscience and contributors. Subject to the AGPLv3 license.
exports.conf = {
enabled: true,
guildOnly: true,
aliases: ['unpause'],
permLevel: 'User',
requiredPerms: [],
cooldown: 2000
}
exports.help = {
name: 'resume',
category: 'Music',
description: 'Starts music back up if it was paused.',
usage: 'resume',
parameters: ''
}
const { getGuild } = require('../utils/music')
exports.run = async (client, message, args, level, data) => {
const guild = getGuild(message.guild.id)
if (guild.paused === false) {
return message.channel.send('<:error:466995152976871434> The music is already playing, use pause to pause the music first!')
}
if (guild.queue.length < 1) {
return message.channel.send('<:error:466995152976871434> Nothing is playing!')
}
guild.playing = true
guild.paused = false
guild.dispatcher.resume()
message.channel.send('<:success:466995111885144095> Music playback has been resumed.')
}

71
commands/ship.js Normal file
View File

@ -0,0 +1,71 @@
// 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: 'ship',
category: 'Fun',
description: 'Ship two people together <3',
usage: 'ship `[name1]` `[name2]`',
parameters: '`name1` The name of the first person you want to ship.\n `name` The name of the second person you want to ship.'
}
const { MessageEmbed } = require('discord.js')
exports.run = async (client, message, args, level, data) => {
var rating = Math.floor(Math.random() * 100) + 1
var meter = ['▬', '▬', '▬', '▬', '▬', '▬', '▬', '▬', '▬']
var hearts = [
'❤️',
'🧡',
'💛',
'💚',
'💙',
'💜'
]
if (!args[0]) {
return message.channel.send(client.userError(exports, 'Missing argument, the `name1` argument is required!'))
}
if (!args[1]) {
return message.channel.send(client.userError(exports, 'Missing argument, the `name2` argument is required!'))
}
const firstName = args[0]
const secondName = args[1]
const shipName = firstName.substr(0, firstName.length * 0.5) + secondName.substr(secondName.length * 0.5)
if (shipName.toLowerCase() === 'teily' || shipName.toLowerCase() === 'emrra') {
rating = '100'
}
var pos = 0
var under = 9
while (pos < 10) {
if (rating < under) {
meter.splice(pos, 0, hearts.random())
break
}
pos++
under += 10
}
if (rating >= 99) {
meter.splice(9, 0, hearts.random())
}
const embed = new MessageEmbed()
embed.setTitle(`Original Names: ${firstName}, ${secondName}`)
embed.setColor(client.embedColour(message.guild))
embed.setDescription(`Ship Name: **${shipName}**\nCompatibility: **${rating}%**\n**[**${meter.join('')}**]**`)
message.channel.send(embed)
}

38
commands/shuffle.js Normal file
View File

@ -0,0 +1,38 @@
// 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: 'shuffle',
category: 'Music',
description: 'Mixes up the songs in the queue',
usage: 'shuffle',
parameters: ''
}
const { getGuild } = require('../utils/music')
module.exports.run = (client, message, args, level) => {
var queue = getGuild(message.guild.id).queue
if (queue.length < 4) {
return message.channel.send('<:error:466995152976871434> There aren\'t enough songs are in the queue for this command to work!')
}
const max = queue.length - 1
const min = 1
for (let i = max; i >= min; i--) {
const randomIndex = Math.floor(Math.random() * (max - min + 1)) + min
const itemAtIndex = queue[randomIndex]
queue[randomIndex] = queue[i]
queue[i] = itemAtIndex
}
message.channel.send('<:success:466995111885144095> Queue shuffled!')
}

25
commands/skip.js Normal file
View File

@ -0,0 +1,25 @@
// 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.')
}

35
commands/stop.js Normal file
View File

@ -0,0 +1,35 @@
// 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: 'stop',
category: 'Music',
description: 'Stops music, clears the queue and disconnects from the voice channel.',
usage: 'stop',
params: ''
}
const { getGuild } = require('../utils/music')
exports.run = async (client, message) => {
const guild = getGuild(message.guild.id)
if (guild.queue.length < 1 || !guild.playing || !guild.dispatcher) return message.channel.send('Nothing is playing.')
if (!message.member.voice.channel) return message.channel.send('You need to be in voice channel to use this command!')
guild.dispatcher.end('silent')
guild.queue = []
guild.playing = false
guild.paused = false
guild.skippers = []
message.channel.send('Playback stopped!')
}

22
commands/support.js Normal file
View File

@ -0,0 +1,22 @@
// 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')
}

45
commands/volume.js Normal file
View File

@ -0,0 +1,45 @@
// 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 + '%')
}
}
}

67
commands/voteskip.js Normal file
View File

@ -0,0 +1,67 @@
// 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: 'voteskip',
category: 'Music',
description: 'Vote to skip the currently playing song.',
usage: 'voteskip',
params: ''
}
const { skip, getGuild } = require('../utils/music')
exports.run = (client, message, args, level) => {
const guild = getGuild(message.guild.id)
if (guild.queue.length < 1 || !guild.playing || !guild.dispatcher) {
return message.channel.send(
'<:error:466995152976871434> Nothing is playing.'
)
}
const vc = message.guild.members.cache.get(client.user.id).voice.channel
if (vc !== message.member.voice.channel) {
return message.channel.send(
'<:error:466995152976871434> You need to be in my voice channel to use this command!'
)
}
if (guild.queue[0].requestedBy.id === message.author.id) {
skip(message.guild, 'skip')
message.channel.send(
'<:success:466995111885144095> Song has been skipped by the user who requested it.'
)
return
}
if (guild.skippers.indexOf(message.author.id) === -1) {
guild.skippers.push(message.author.id)
if (guild.skippers.length >= Math.ceil(vc.members.filter(member => !member.user.bot).size / 2)) {
skip(message.guild, 'skip')
message.channel.send(
'<:skip:467216735356059660> Song skipped.'
)
} else {
message.channel.send(
`<:success:466995111885144095> Your vote has been acknowledged! **${guild.skippers.length + '/' + Math.ceil(vc.members.filter(member => !member.user.bot).size / 2)}**`
)
};
} else {
message.channel.send(
'<:denied:466995195150336020> You cannot vote twice!'
)
}
}

View File

@ -1,75 +1,103 @@
const config = {
// 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.
// Discord tokens
token: '',
devtoken: '',
// 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
// Bot name
botName: '',
// Tokens
"token": "", // Your bot's token.
"devtoken": "", // (optional) another token, meant for a bot used for development
"ytkey": "", // Youtube API key, needed for music searching to work
"dblkey": "", // top.gg key, sends bot statistics to top.gg. You do not need this.
// 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",
// 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
},
// Perm levels
// API keys that are required for some features/commands
keys: {
dbl: '', // top.gg key
sentry: '' // sentry.io dsn
},
// Configurable API endpoints
endpoints: {
invidious: 'https://invidious.snopyta.org/api/'
},
// 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: ''
},
// 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
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 ? true : false) : false
},
{
level: 3,
name: 'Server Owner',
check: (message) => message.channel.type === 'text' ? (message.guild.ownerID === message.author.id) : false
}
]
};
}
module.exports = config;
module.exports = config

5
events/disconnect.js Normal file
View File

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

5
events/error.js Normal file
View File

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

22
events/guildCreate.js Normal file
View File

@ -0,0 +1,22 @@
// 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)
}
}

23
events/guildDelete.js Normal file
View File

@ -0,0 +1,23 @@
// 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)
}
}

126
events/message.js Normal file
View File

@ -0,0 +1,126 @@
// 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)
}

29
events/ready.js Normal file
View File

@ -0,0 +1,29 @@
// 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)
}

5
events/reconnecting.js Normal file
View File

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

View File

@ -0,0 +1,48 @@
// Copyright 2020 Emily J. / mudkipscience and contributors. Subject to the AGPLv3 license.
const music = require('../utils/music')
module.exports = (client, oldState, newState) => {
if (newState.channelID !== oldState.channelID) {
const guild = music.getGuild(newState.guild.id)
// Reset queue, dispatcher, etc if Woomy is forcibly disconnected from the queue
if (guild.voiceChannel && !guild.voiceChannel.members.get(client.user.id) && guild.queue.length > 0) {
guild.queue = []
guild.playing = false
guild.paused = false
guild.skippers = []
}
// Auto-disconnect feature
if (guild.playing && guild.channel && guild.voiceChannel.id === oldState.channelID) {
if (guild.voiceChannel.members.filter(member => !member.user.bot).size < 1) {
guild.autoDisconnect = true
guild.message.channel.send(`The music will end in 2 minutes if nobody rejoins **${guild.voiceChannel.name}**`)
.then(msg => {
msg.delete({ timeout: 120000 })
})
setTimeout(() => {
if (guild.dispatcher !== null && guild.voiceChannel.members.filter(member => !member.user.bot).size < 1 && guild.autoDisconnect) {
// Probably should be async? But no need here I think
guild.dispatcher.end('silent')
guild.queue = []
guild.playing = false
guild.paused = false
guild.dispatcher = null
guild.skippers = []
guild.message.channel.send('The music has ended because no one was listening to me ;~;')
} else {
guild.autoDisconnect = false
}
}, 120000)
} else {
guild.autoDisconnect = false
}
}
}
}

195
index.js
View File

@ -1,93 +1,122 @@
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.");
};
// Copyright 2020 Emily J. / mudkipscience and contributors. Subject to the AGPLv3 license.
const Discord = require('discord.js');
const { promisify } = require('util');
const readdir = promisify(require('fs').readdir);
const Enmap = require('enmap');
const chalk = require('chalk');
const client = new Discord.Client();
'use strict'
try {
client.config = require('./config');
} catch (err) {
console.log('Failed to load config.js:', err);
process.exit();
};
// remove this after we uncomment sentry
/* eslint-disable no-unused-vars */
try{
client.version = require('./version.json');
} catch (err) {
console.log('Failed to load version.json:', 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.logger = require('./src/modules/Logger');
} catch (err) {
console.log('Failed to load Logger.js:', err);
process.exit();
};
// Libraries
const Discord = require('discord.js')
const fs = require('fs')
const isDocker = require('is-docker')
const sentry = require('@sentry/node')
client.logger.setClient(client);
// Create bot client instance
const client = new Discord.Client({ disabledEvents: ['TYPING_START'] })
try{
require("./src/modules/functions")(client);
} catch (err) {
console.log('Failed to load functions.js:', err);
process.exit();
};
// 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)
if(client.config.devmodeEnabled == true && process.env['USER'] != 'container') {
client.devmode = true;
} else {
client.devmode = false;
if(client.config.dblkey.length > 0) {
const DBL = require("dblapi.js");
const dblapi = new DBL(client.config.dblkey, client);
};
};
// 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]
}
}
client.commands = new Enmap();
client.aliases = new Enmap();
client.settings = new Enmap({name: 'settings'});
const init = async () => {
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);
};
});
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));
});
client.levelCache = {};
for (let i = 0; i < client.config.permLevels.length; i++) {
const thisLevel = client.config.permLevels[i];
client.levelCache[thisLevel.name] = thisLevel.level;
};
if(client.devmode === true) {
client.login(client.config.devtoken);
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
} else {
client.login(client.config.token);
};
};
client.devmode = false
}
}
init();
if (client.devmode) {
client.logger.warn('Running in development mode.')
}
// 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()
// Main initialisation function
const init = async () => {
// initialise sentry
if (client.config.keys.sentry !== '' && client.devmode === false) {
// sentry.init({ dsn: client.config.keys.sentry })
}
// 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)
}
})
})
// 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
for (let i = 0; i < client.config.permLevels.length; i++) {
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)
} else {
client.login(client.config.devtoken).catch(failedToLogin)
}
}
init()

98
models/guild.js Normal file
View File

@ -0,0 +1,98 @@
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

8
models/member.js Normal file
View File

@ -0,0 +1,8 @@
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
}))

28
models/user.js Normal file
View File

@ -0,0 +1,28 @@
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 Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,34 +1,30 @@
{
"name": "woomy",
"version": "1.1.0",
"description": "Woomy is a all-purpose discord bot built off the guidebot base and coded in node.js using discord.js.",
"version": "2.0.0",
"description": "uwu",
"main": "index.js",
"dependencies": {
"@discordjs/opus": "^0.1.0",
"better-sqlite3": "^5.4.1",
"chalk": "^3.0.0",
"dblapi.js": "^2.3.1",
"discord.js": "^12.0.2",
"enmap": "^5.2.4",
"garfield": "^1.1.2",
"get-youtube-id": "^1.0.1",
"@sentry/node": "^5.15.4",
"colors": "^1.4.0",
"discord.js": "^12.2.0",
"hastebin-gen": "^2.0.5",
"is-docker": "^2.0.0",
"moment": "^2.24.0",
"moment-duration-format": "^2.3.2",
"nekos.life": "^2.0.5",
"mongoose": "^5.9.9",
"node-fetch": "^2.6.0",
"openweather-apis": "^4.2.0",
"prism-media": "^1.2.1",
"randomcolor": "^0.5.4",
"relevant-urban": "^2.0.0",
"request": "^2.88.2",
"to-zalgo": "^1.0.1",
"urban": "^0.3.2",
"weather-js": "^2.0.0",
"youtube-info": "^1.3.2",
"ytdl-core-discord": "^1.1.0"
"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"
},
"devDependencies": {},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
@ -37,7 +33,7 @@
"url": "git+https://github.com/mudkipscience/woomy.git"
},
"author": "mudkipscience",
"license": "MIT",
"license": "GPL-3.0",
"bugs": {
"url": "https://github.com/mudkipscience/woomy/issues"
},

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,38 +0,0 @@
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]"
};

View File

@ -1,58 +0,0 @@
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

@ -1,41 +0,0 @@
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]"
};

View File

@ -1,45 +0,0 @@
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]"
};

View File

@ -1,61 +0,0 @@
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]"
};

View File

@ -1,69 +0,0 @@
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"
};

View File

@ -1,38 +0,0 @@
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>"
};

View File

@ -1,87 +0,0 @@
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>"
};

View File

@ -1,124 +0,0 @@
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 blacklist! Usage: \`${client.commands.get(`blacklist`).help.usage}\``
)
}
member = member.join(" ")
if(!member) {
return message.channel.send(
`<:error:466995152976871434> You didn't tell me who to blacklist! Usage: \`${client.commands.get(`blacklist`).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 blacklist the owner!")
};
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 blacklist people higher ranked than yourself!`
);
};
if(user.id === message.member.id) {
return message.channel.send('<:error:466995152976871434> You can\'t blacklist yourself!');
};
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 has already been blacklisted!');
};
};
client.settings.push(message.guild.id, user.id, "blacklisted")
return message.channel.send(`<:success:466995111885144095> Blacklisted \`${user.user.tag}\``)
};
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 blacklisted!');
};
client.settings.remove(message.guild.id, user.id, "blacklisted")
return message.channel.send(`<:success:466995111885144095> Removed \`${user.user.tag}\` from the blacklist.`)
};
};
exports.conf = {
enabled: true,
guildOnly: true,
aliases: [],
permLevel: "Administrator",
requiredPerms: []
};
exports.help = {
name: "blacklist",
category: "Moderation",
description: "Allows you to configure Woomy's blacklist. Blacklisted users cannot use commands.",
usage: "blacklist [add/remove] [member]"
};

View File

@ -1,45 +0,0 @@
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 kareoke",
usage: "bohemian_rhapsody"
};

View File

@ -1,42 +0,0 @@
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}\``
);
}
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}\`\`\``);
};
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]"
};

View File

@ -1,30 +0,0 @@
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"
};

View File

@ -1,27 +0,0 @@
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}`);
};
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"
};

View File

@ -1,18 +0,0 @@
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"
};

View File

@ -1,29 +0,0 @@
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"
};

View File

@ -1,35 +0,0 @@
exports.run = (client, message, args) => {
if(!args[0]) {
return message.channel.send(
`<:error:466995152976871434> Invalid choice. Usage: \`${client.commands.get(`flip`).help.usage}\``
);
};
if(args[0].toLowerCase() != "heads" && args[0].toLowerCase() != "tails") {
return message.channel.send(
`<:error:466995152976871434> Invalid choice. Usage: \`${client.commands.get(`flip`).help.usage}\``
);
};
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 [heads/tails]"
};

View File

@ -1,57 +0,0 @@
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://api.alexflipnote.xyz/colour/image/" + colour.replace("#", ""));
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>"
};

View File

@ -1,20 +0,0 @@
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"
};

View File

@ -1,45 +0,0 @@
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"
};

View File

@ -1,69 +0,0 @@
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!)"
};

View File

@ -1,27 +0,0 @@
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>"
};

View File

@ -1,30 +0,0 @@
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"
};

View File

@ -1,27 +0,0 @@
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}`);
};
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"
};

View File

@ -1,42 +0,0 @@
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]"
};

View File

@ -1,56 +0,0 @@
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]"
};

View File

@ -1,46 +0,0 @@
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]"
};

View File

@ -1,30 +0,0 @@
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"
};

View File

@ -1,69 +0,0 @@
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!)"
};

View File

@ -1,28 +0,0 @@
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]"
};

View File

@ -1,28 +0,0 @@
exports.run = (client, message) => {
let guild = client.music.getGuild(message.guild.id);
if(guild.queue.length < 1) return message.channel.send(
`<:error:466995152976871434> There is nothing for me to skip!`
);
skip_song(guild);
message.channel.send("<:skip:467216735356059660> Skipped the song!")
};
exports.conf = {
enabled: true,
guildOnly: true,
aliases: [],
permLevel: "Moderator",
requiredPerms: ["SPEAK"]
};
exports.help = {
name: "forceskip",
category: "Music",
description: "Skips the currently playing song without requiring a vote.",
usage: "forceskip"
};
function skip_song(guild) {
guild.dispatcher.end();
}

View File

@ -1,30 +0,0 @@
const API = require('nekos.life');
const {sfw} = new API();
exports.run = async (client, message) => {
message.channel.startTyping();
try {
sfw.foxGirl().then((json) => {
message.channel.send(json.url)
message.channel.stopTyping();
});
} catch (err) {
client.logger.error("foxgirl.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: "foxgirl",
category: "Image",
description: "Sends you pictures of fox girls.",
usage: "foxgirl"
};

View File

@ -1,21 +0,0 @@
const garfield = require("garfield");
exports.run = async (client, message) => {
message.channel.send({ files: [garfield.random()] }).catch(() => message.channel.send(
"<:error:466995152976871434> API didn't respond, try again in a few seconds."
));
};
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"
};

View File

@ -1,87 +0,0 @@
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]"
};

View File

@ -1,42 +0,0 @@
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"
};

View File

@ -1,60 +0,0 @@
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>"
};

View File

@ -1,174 +0,0 @@
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://discordapp.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://discordapp.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"
};

View File

@ -1,69 +0,0 @@
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!)"
};

View File

@ -1,36 +0,0 @@
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

@ -1,28 +0,0 @@
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)]}));
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"
};

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