mirror of
https://code.chipmunk.land/Parker2991/NitoriBot/
synced 2026-11-29 13:45:38 -05:00
Compare commits
118
Commits
v6.0.3
...
java-rewrite
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1a63807a7c | ||
|
|
9dce8155bd | ||
|
|
b0ce56d5c1 | ||
|
|
3c32ea5035 | ||
|
|
99e6a2b0e5 | ||
|
|
619f423574 | ||
|
|
f39660471d | ||
|
|
21cd397781 | ||
|
|
d5212e8e5c | ||
|
|
0f219ce5f6 | ||
|
|
24e981fc9e | ||
|
|
b3ba585f01 | ||
|
|
fde361b0fb | ||
|
|
fce93b87c8 | ||
|
|
b26ff81a1e | ||
|
|
5f2c3c533f | ||
|
|
89eacecf45 | ||
|
|
3317024e2d | ||
|
|
03514e4f57 | ||
|
|
b39148b53e | ||
|
|
288fbba036 | ||
|
|
9c230811b4 | ||
|
|
b17b363971 | ||
|
|
0661068e8f | ||
|
|
ec7e3fc5af | ||
|
|
23e738aa59 | ||
|
|
758d777439 | ||
|
|
38f91a0266 | ||
|
|
a0559985d8 | ||
|
|
48d0611194 | ||
|
|
bd60ff8325 | ||
|
|
c6c293348b | ||
|
|
5291ebced4 | ||
|
|
d2ee401e5d | ||
|
|
cf4560be24 | ||
|
|
58a020dfd4 | ||
|
|
b10e9bddf5 | ||
|
|
f788ae5df7 | ||
|
|
61c3a4adfc | ||
|
|
c059edeb4e | ||
|
|
27a6b07845 | ||
|
|
df0208d9e6 | ||
|
|
62e9b55e92 | ||
|
|
4df2a8e3f0 | ||
|
|
4aeda035f4 | ||
|
|
aee503525e | ||
|
|
83533cef46 | ||
|
|
fcbd9f983c | ||
|
|
fa15c03c6d | ||
|
|
5d5700b61d | ||
|
|
2f21f670e0 | ||
|
|
e33988d103 | ||
|
|
e7a8aa226c | ||
|
|
881c2a8d0e | ||
|
|
f9e0406143 | ||
|
|
232546aeab | ||
|
|
68e4836359 | ||
|
|
b71f4a2ab0 | ||
|
|
872cf09c6a | ||
|
|
a76e65b18f | ||
|
|
d2e2124fbe | ||
|
|
c99d3ab302 | ||
|
|
9d1d818d30 | ||
|
|
d7f216e441 | ||
|
|
127ec9eb42 | ||
|
|
346f1eb0de | ||
|
|
cee0a22f55 | ||
|
|
422db19bdb | ||
|
|
06258b3a0c | ||
|
|
dc08bcad37 | ||
|
|
28be25d2e6 | ||
|
|
c1c09466b4 | ||
|
|
c0149e36d1 | ||
|
|
a7c9a37481 | ||
|
|
8bd1e92381 | ||
|
|
7cb0524f24 | ||
|
|
a8a0b210be | ||
|
|
229f4c5664 | ||
|
|
37e19521a4 | ||
|
|
799b49569e | ||
|
|
c522270815 | ||
|
|
e92153bb81 | ||
|
|
25ee0ce1e4 | ||
|
|
b9ae2a3bf7 | ||
|
|
3a1d335753 | ||
|
|
668312461f | ||
|
|
18e2278ebd | ||
|
|
1fd50ab7fa | ||
|
|
6d43ecc249 | ||
|
|
7eadb4eccd | ||
|
|
59ab5966c4 | ||
|
|
697eed1616 | ||
|
|
ffbe6f72a8 | ||
|
|
124778fd4b | ||
|
|
e690e1006c | ||
|
|
2075f57443 | ||
|
|
2e50641297 | ||
|
|
3a5b5bdbbc | ||
|
|
122e8e7df0 | ||
|
|
23288717ab | ||
|
|
639a2b0eaa | ||
|
|
f60f5c4a15 | ||
|
|
572e09989c | ||
|
|
ad4f35bb4c | ||
|
|
e655f831d3 | ||
|
|
a140a2d12e | ||
|
|
8f61177250 | ||
|
|
ab87e748f9 | ||
|
|
ca45444dd5 | ||
|
|
ac2f59d14d | ||
|
|
ee887d5081 | ||
|
|
0a637e0c8f | ||
|
|
3344fc6e2e | ||
|
|
0aed4d7d7a | ||
|
|
831fda8607 | ||
|
|
c6f77b0ac3 | ||
|
|
e75576a488 | ||
|
|
0b264d7aaf |
@@ -0,0 +1,12 @@
|
||||
#
|
||||
# https://help.github.com/articles/dealing-with-line-endings/
|
||||
#
|
||||
# Linux start script should use lf
|
||||
/gradlew text eol=lf
|
||||
|
||||
# These are Windows script files and should use crlf
|
||||
*.bat text eol=crlf
|
||||
|
||||
# Binary files should be left untouched
|
||||
*.jar binary
|
||||
|
||||
+14
-5
@@ -1,5 +1,14 @@
|
||||
node_modules
|
||||
config.yml
|
||||
.git
|
||||
src/modules/exploits.js
|
||||
logs/*
|
||||
# Ignore Gradle project-specific cache directory
|
||||
.gradle
|
||||
|
||||
# Ignore Gradle build output directory
|
||||
build
|
||||
|
||||
# Ignore Kotlin plugin data
|
||||
.kotlin
|
||||
|
||||
# Ignore the bin folder vscode keeps creating
|
||||
bin
|
||||
|
||||
# Ignore the config
|
||||
config.yaml
|
||||
|
||||
Generated
+3
@@ -0,0 +1,3 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
Generated
+9
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$" />
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
||||
Generated
+6
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CompilerConfiguration">
|
||||
<bytecodeTargetLevel target="25" />
|
||||
</component>
|
||||
</project>
|
||||
Generated
+17
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="GradleMigrationSettings" migrationVersion="1" />
|
||||
<component name="GradleSettings">
|
||||
<option name="linkedExternalProjectsSettings">
|
||||
<GradleProjectSettings>
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||
<option name="gradleJvm" value="25" />
|
||||
<option name="modules">
|
||||
<set>
|
||||
<option value="$PROJECT_DIR$" />
|
||||
</set>
|
||||
</option>
|
||||
</GradleProjectSettings>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
||||
Generated
+7
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="KotlinJpsPluginSettings">
|
||||
<option name="externalSystemId" value="Gradle" />
|
||||
<option name="version" value="2.3.10" />
|
||||
</component>
|
||||
</project>
|
||||
Generated
+5
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_25" default="true" project-jdk-name="25 (4)" project-jdk-type="JavaSDK" />
|
||||
</project>
|
||||
Generated
+6
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
@@ -0,0 +1,661 @@
|
||||
GNU AFFERO GENERAL PUBLIC LICENSE
|
||||
Version 3, 19 November 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://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 <https://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
|
||||
<https://www.gnu.org/licenses/>.
|
||||
@@ -0,0 +1,62 @@
|
||||
version = "v9.0.0"
|
||||
group = "nitoribot"
|
||||
description = "NitoriBot"
|
||||
plugins {
|
||||
id("com.gradleup.shadow") version "9.2.2"
|
||||
kotlin("jvm") version "2.3.10"
|
||||
id("maven-publish")
|
||||
application
|
||||
}
|
||||
|
||||
kotlin {
|
||||
jvmToolchain(25)
|
||||
}
|
||||
|
||||
repositories {
|
||||
|
||||
mavenCentral()
|
||||
|
||||
maven("https://repo.opencollab.dev/maven-releases/")
|
||||
|
||||
maven("https://repo.opencollab.dev/maven-snapshots/")
|
||||
|
||||
maven("https://jitpack.io/")
|
||||
|
||||
maven("https://repo.opencollab.dev/main/")
|
||||
|
||||
maven("https://maven.maxhenkel.de/repository/public/")
|
||||
|
||||
// maven("https://libraries.minecraft.net")
|
||||
|
||||
/* maven("https://code.optmstc.dev/api/packages/kso/maven") {
|
||||
content {
|
||||
includeGroupAndSubgroups("land.chipmunk.code")
|
||||
}
|
||||
}*/
|
||||
|
||||
//maven("https://libraries.minecraft.net")
|
||||
|
||||
maven("https://code.chipmunk.land/api/packages/kaboomstandardsorganization/maven/")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation("org.geysermc.mcprotocollib:protocol:26.2-SNAPSHOT")
|
||||
implementation("org.slf4j:slf4j-api:2.0.13")
|
||||
implementation("org.tinylog:slf4j-tinylog:2.7.0")
|
||||
implementation("org.tinylog:tinylog-impl:2.7.0")
|
||||
implementation("org.yaml:snakeyaml:2.2")
|
||||
implementation("net.kyori:adventure-text-serializer-ansi:4.26.1")
|
||||
implementation("net.kyori:adventure-text-serializer-plain:4.26.1")
|
||||
implementation("net.kyori:adventure-text-serializer-legacy:4.26.1")
|
||||
implementation("net.kyori:adventure-text-serializer-gson:4.26.1")
|
||||
implementation("net.dv8tion:JDA:6.4.1")
|
||||
implementation("de.connect2x.trixnity:trixnity-client:5.0.0")
|
||||
implementation("org.pircbotx:pircbotx:2.1")
|
||||
implementation("org.jline:jline:4.1.0")
|
||||
implementation("land.chipmunk.code.kaboomstandardsorganization.messaginglib:mcprotocollib:3.1.2")
|
||||
}
|
||||
|
||||
application {
|
||||
mainClass.set("land.chipmunk.parker2991.nitoribot.Main")
|
||||
}
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
java -jar build/libs/NitoriBot-v9.0.0-all.jar
|
||||
@@ -0,0 +1 @@
|
||||
sh ./framework/keepalive.sh
|
||||
Executable
+8
@@ -0,0 +1,8 @@
|
||||
echo "starting reset process at $HOME/keepalive"
|
||||
|
||||
dtach -n $HOME/keepalive sh ./framework/reset.sh
|
||||
|
||||
while true; do
|
||||
sh ./framework/bot.sh
|
||||
sleep 5
|
||||
done
|
||||
@@ -0,0 +1,4 @@
|
||||
while true; do
|
||||
sleep 24h
|
||||
pkill -f "java"
|
||||
done
|
||||
@@ -0,0 +1,5 @@
|
||||
# This file was generated by the Gradle 'init' task.
|
||||
# https://docs.gradle.org/current/userguide/build_environment.html#sec:gradle_configuration_properties
|
||||
|
||||
org.gradle.configuration-cache=true
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
# This file was generated by the Gradle 'init' task.
|
||||
# https://docs.gradle.org/current/userguide/version_catalogs.html#sec::toml-dependencies-format
|
||||
Vendored
BIN
Binary file not shown.
+1
-1
@@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.7.0-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
+7
-8
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Copyright © 2015-2021 the original authors.
|
||||
# Copyright © 2015 the original authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@@ -15,6 +15,8 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
@@ -55,7 +57,7 @@
|
||||
# Darwin, MinGW, and NonStop.
|
||||
#
|
||||
# (3) This script is generated from the Groovy template
|
||||
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# https://github.com/gradle/gradle/blob/b631911858264c0b6e4d6603d677ff5218766cee/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# within the Gradle project.
|
||||
#
|
||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||
@@ -84,7 +86,7 @@ done
|
||||
# shellcheck disable=SC2034
|
||||
APP_BASE_NAME=${0##*/}
|
||||
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
||||
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
|
||||
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD=maximum
|
||||
@@ -112,7 +114,6 @@ case "$( uname )" in #(
|
||||
NONSTOP* ) nonstop=true ;;
|
||||
esac
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
@@ -170,7 +171,6 @@ fi
|
||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||
if "$cygwin" || "$msys" ; then
|
||||
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
||||
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
|
||||
|
||||
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
||||
|
||||
@@ -203,15 +203,14 @@ fi
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Collect all arguments for the java command:
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
||||
# and any embedded shellness will be escaped.
|
||||
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
||||
# treated as '${Hostname}' itself on the command line.
|
||||
|
||||
set -- \
|
||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||
-classpath "$CLASSPATH" \
|
||||
org.gradle.wrapper.GradleWrapperMain \
|
||||
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
|
||||
"$@"
|
||||
|
||||
# Stop when "xargs" is not available.
|
||||
+93
-92
@@ -1,92 +1,93 @@
|
||||
@rem
|
||||
@rem Copyright 2015 the original author or authors.
|
||||
@rem
|
||||
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@rem you may not use this file except in compliance with the License.
|
||||
@rem You may obtain a copy of the License at
|
||||
@rem
|
||||
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||
@rem
|
||||
@rem Unless required by applicable law or agreed to in writing, software
|
||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%"=="" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%"=="" set DIRNAME=.
|
||||
@rem This is normally unused
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if %ERRORLEVEL% equ 0 goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if %ERRORLEVEL% equ 0 goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
set EXIT_CODE=%ERRORLEVEL%
|
||||
if %EXIT_CODE% equ 0 set EXIT_CODE=1
|
||||
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
|
||||
exit /b %EXIT_CODE%
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
||||
@rem
|
||||
@rem Copyright 2015 the original author or authors.
|
||||
@rem
|
||||
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@rem you may not use this file except in compliance with the License.
|
||||
@rem You may obtain a copy of the License at
|
||||
@rem
|
||||
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||
@rem
|
||||
@rem Unless required by applicable law or agreed to in writing, software
|
||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
@rem SPDX-License-Identifier: Apache-2.0
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%"=="" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%"=="" set DIRNAME=.
|
||||
@rem This is normally unused
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if %ERRORLEVEL% equ 0 goto execute
|
||||
|
||||
echo. 1>&2
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
|
||||
echo. 1>&2
|
||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||
echo location of your Java installation. 1>&2
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto execute
|
||||
|
||||
echo. 1>&2
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
|
||||
echo. 1>&2
|
||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||
echo location of your Java installation. 1>&2
|
||||
|
||||
goto fail
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if %ERRORLEVEL% equ 0 goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
set EXIT_CODE=%ERRORLEVEL%
|
||||
if %EXIT_CODE% equ 0 set EXIT_CODE=1
|
||||
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
|
||||
exit /b %EXIT_CODE%
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
||||
Generated
-5082
File diff suppressed because it is too large
Load Diff
@@ -1,22 +0,0 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"cowsay": "^1.6.0",
|
||||
"cowsay2": "^2.0.4",
|
||||
"discord.js": "^14.11.0",
|
||||
"java-parser": "^2.3.2",
|
||||
"js-yaml": "^4.1.0",
|
||||
"json-stringify": "^1.0.0",
|
||||
"json5": "^2.2.3",
|
||||
"jvm": "^0.5.3",
|
||||
"man-db": "^1.0.3",
|
||||
"minecraft-data": "^3.36.1",
|
||||
"minecraft-protocol": "^1.47.0",
|
||||
"mojangson": "^2.0.4",
|
||||
"node-gyp": "^10.2.0",
|
||||
"prismarine-auth": "^2.2.0",
|
||||
"prismarine-chat": "^1.10.1",
|
||||
"prismarine-registry": "^1.7.0",
|
||||
"wikipedia": "^2.1.2",
|
||||
"xml2js": "^0.6.2"
|
||||
}
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
const nbt = require('prismarine-nbt');
|
||||
async function aaa () {
|
||||
console.log(await nbt.stringify("e"));
|
||||
}
|
||||
aaa()
|
||||
@@ -1,65 +0,0 @@
|
||||
const bots = require('../data/changelog.json');
|
||||
module.exports = {
|
||||
name: 'changelog',
|
||||
description: ['check the bots changelog'],
|
||||
trustLevel: 0,
|
||||
aliases: ['clv', 'changes'],
|
||||
usage:[""],
|
||||
execute (context) {
|
||||
const query = context.arguments.join(' ').toLowerCase()
|
||||
const bot = context.bot
|
||||
if (query.length === 0) {
|
||||
const list = []
|
||||
|
||||
for (const info of bots) {
|
||||
if (list.length !== 0) list.push({ text: ', ', color: 'gray' })
|
||||
list.push(info.name)
|
||||
}
|
||||
const category = {
|
||||
translate: ' (%s%s%s%s%s%s%s%s%s) ',
|
||||
bold: false,
|
||||
color: 'gray',
|
||||
with: [
|
||||
{ color: 'aqua', text: 'Alpha Release' },
|
||||
{ color: 'gray', text: ' | ' },
|
||||
{ color: 'blue', text: 'Beta Release' },
|
||||
{ color: 'gray', text: ' | ' },
|
||||
{ color: 'green', text: 'Minor release' },
|
||||
{ color: 'gray', text: ' | ' },
|
||||
{ color: 'gold', text: 'Revision Release' },
|
||||
{ color: 'gray', text: ' | ' },
|
||||
{ color: 'dark_red', text: 'Major Release' }
|
||||
]
|
||||
}
|
||||
bot.tellraw("@a", [{ text: 'Changelogs (', color: 'gray' }, { text: JSON.stringify(bots.length), color: 'gold' }, { text: ')', color: 'gray' }, category, ' - ', ...list])
|
||||
return
|
||||
}
|
||||
|
||||
for (const info of bots) {
|
||||
const plainName = String(context.bot.getMessageAsPrismarine(info.name)).toLowerCase()
|
||||
if (plainName.includes(query)) this.sendBotInfo(info, context.bot)
|
||||
}
|
||||
},
|
||||
|
||||
sendBotInfo (info, bot) {
|
||||
const component = ['']
|
||||
component.push('', info.name)
|
||||
if (info.exclaimer) component.push('\n', ' ', info.exclaimer)
|
||||
if (info.authors && info.authors.length !== 0) {
|
||||
component.push('\n', 'Codename ')
|
||||
for (const author of info.authors) {
|
||||
component.push(author, { text: ', ', color: 'gray' })
|
||||
}
|
||||
component.pop()
|
||||
}
|
||||
if (info.foundation) component.push('\n', 'Date: ', info.foundation)
|
||||
if (info.prefixes && info.prefixes.length !== 0) {
|
||||
component.push('\n', '')
|
||||
for (const prefix of info.prefixes) {
|
||||
component.push(prefix, { text: ' ', color: 'gray' })
|
||||
}
|
||||
component.pop()
|
||||
}
|
||||
bot.tellraw('@a', [component])
|
||||
}
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
const https = require('node:https');
|
||||
|
||||
https.get('https://encrypted.google.com/', (res) => {
|
||||
console.log('statusCode:', res.statusCode);
|
||||
// console.log('headers:', res.headers);
|
||||
console.log((res.complete))
|
||||
let data;
|
||||
res.on('data', (d) => {
|
||||
process.stdout.write(d);
|
||||
// if (data === undefined) data = chunk;
|
||||
// else data += chunk;
|
||||
// console.log(data);
|
||||
});
|
||||
|
||||
}).on('error', (e) => {
|
||||
console.error(e);
|
||||
});
|
||||
@@ -1,70 +0,0 @@
|
||||
/*
|
||||
* This file was generated by the Gradle 'init' task.
|
||||
*
|
||||
* This is a general purpose Gradle build.
|
||||
* To learn more about Gradle by exploring our Samples at https://docs.gradle.org/8.5/samples
|
||||
*/
|
||||
/*
|
||||
* This file was generated by the Gradle 'init' task.
|
||||
*/
|
||||
|
||||
plugins {
|
||||
id 'java'
|
||||
id 'java-library'
|
||||
id 'maven-publish'
|
||||
id 'com.github.johnrengelman.shadow' version '8.1.1'
|
||||
}
|
||||
|
||||
group = 'land.chipmunk.parker2991'
|
||||
version = 'v6.0.0-alpha(ff08479)'
|
||||
description = 'FNFBoyfriendBot'
|
||||
java.sourceCompatibility = JavaVersion.VERSION_17
|
||||
|
||||
repositories {
|
||||
mavenLocal()
|
||||
|
||||
mavenCentral()
|
||||
|
||||
maven {
|
||||
url = uri('https://repo.opencollab.dev/maven-snapshots/')
|
||||
}
|
||||
|
||||
maven {
|
||||
url = uri('https://repo.opencollab.dev/maven-releases/')
|
||||
}
|
||||
|
||||
maven {
|
||||
url = uri('https://repo.maven.apache.org/maven2/')
|
||||
}
|
||||
|
||||
maven {
|
||||
url = uri("https://jitpack.io")
|
||||
}
|
||||
|
||||
maven {
|
||||
url = uri('https://maven.maxhenkel.de/repository/public')
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'com.github.steveice10:mcprotocollib:1.20.2-1-SNAPSHOT'
|
||||
implementation 'net.kyori:adventure-text-serializer-ansi:4.14.0'
|
||||
implementation 'com.google.code.gson:gson:2.10.1'
|
||||
implementation 'com.google.guava:guava:31.1-jre'
|
||||
implementation 'org.jline:jline:3.23.0'
|
||||
implementation 'org.yaml:snakeyaml:2.0'
|
||||
}
|
||||
|
||||
jar {
|
||||
manifest {
|
||||
attributes 'Main-Class': 'land.chipmunk.parker2991.fnfboyfriendbot.Main'
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType(JavaCompile).configureEach {
|
||||
options.encoding = 'UTF-8'
|
||||
}
|
||||
|
||||
tasks.withType(Javadoc).configureEach {
|
||||
options.encoding = 'UTF-8'
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
voiding interger will return a number
|
||||
public static void functionName() {} has the funcion return nothing
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
# This file was generated by the Gradle 'init' task.
|
||||
# https://docs.gradle.org/current/userguide/platforms.html#sub::toml-dependencies-format
|
||||
Binary file not shown.
@@ -1,47 +0,0 @@
|
||||
package land.chipmunk.parker2991.fnfboyfriendbot;
|
||||
|
||||
import land.chipmunk.parker2991.fnfboyfriendbot.*;
|
||||
import com.github.steveice10.mc.auth.data.GameProfile;
|
||||
import com.github.steveice10.mc.protocol.MinecraftProtocol;
|
||||
import com.github.steveice10.mc.protocol.data.game.entity.player.HandPreference;
|
||||
import com.github.steveice10.mc.protocol.data.game.setting.ChatVisibility;
|
||||
import com.github.steveice10.mc.protocol.data.game.setting.SkinPart;
|
||||
import com.github.steveice10.mc.protocol.packet.common.serverbound.ServerboundClientInformationPacket;
|
||||
import com.github.steveice10.mc.protocol.packet.ingame.clientbound.ClientboundLoginPacket;
|
||||
import com.github.steveice10.mc.protocol.packet.login.clientbound.ClientboundGameProfilePacket;
|
||||
import com.github.steveice10.packetlib.Session;
|
||||
import com.github.steveice10.packetlib.event.session.*;
|
||||
import com.github.steveice10.packetlib.packet.Packet;
|
||||
import com.github.steveice10.packetlib.tcp.TcpClientSession;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.ScheduledExecutorService;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
public class Bot {
|
||||
private final ArrayList<ClientListener> listeners = new ArrayList<>();
|
||||
|
||||
public final String host;
|
||||
|
||||
public final int port;
|
||||
|
||||
public final List<Bot> bots;
|
||||
|
||||
public final Options.bots options;
|
||||
|
||||
public Bot (Options.bots options, List<Bot> bots) {
|
||||
this.host = options.host;
|
||||
this.port = options.port;
|
||||
this.options = options;
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
}
|
||||
public class ClientListener {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
-36
@@ -1,36 +0,0 @@
|
||||
package land.chipmunk.parker2991.fnfboyfriendbot;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.nio.file.StandardCopyOption;
|
||||
import org.yaml.snakeyaml.Yaml;
|
||||
import com.google.common.util.concurrent.ThreadFactoryBuilder;
|
||||
import java.io.*;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class Main {
|
||||
public static void main(String[] args) {
|
||||
Bot config = null;
|
||||
Path configPath = Paths.get("config.yml");
|
||||
try {
|
||||
Yaml yaml = new Yaml();
|
||||
config = yaml.load(Files.readString(configPath));
|
||||
System.out.println(config);
|
||||
} catch (IOException e) {
|
||||
System.out.println(e.toString());
|
||||
}
|
||||
List<Bots> bots = new ArrayList<>();
|
||||
for (Options options : config.bots) {
|
||||
final Bot client = new Bot(options, bots);
|
||||
bots.add(client);
|
||||
}
|
||||
}
|
||||
|
||||
private static class Options {
|
||||
|
||||
}
|
||||
}
|
||||
-9
@@ -1,9 +0,0 @@
|
||||
package land.chipmunk.parker2991.fnfboyfriendbot;
|
||||
|
||||
public class Options {
|
||||
public static class bots {
|
||||
public String host = "127.0.0.1";
|
||||
public int port = 25565;
|
||||
public long reconnectDelay;
|
||||
}
|
||||
}
|
||||
-6
@@ -1,6 +0,0 @@
|
||||
package land.chipmunk.parker2991.fnfboyfriendbot.commands;
|
||||
|
||||
|
||||
public class SayCommand {
|
||||
|
||||
}
|
||||
-8
@@ -1,8 +0,0 @@
|
||||
package land.chipmunk.parker2991.fnfboyfriendbot.modules;
|
||||
|
||||
|
||||
public class BruhifyModule {
|
||||
|
||||
|
||||
}
|
||||
|
||||
-8
@@ -1,8 +0,0 @@
|
||||
package land.chipmunk.parker2991.fnfboyfriendbot.modules;
|
||||
|
||||
|
||||
public class ChatCommandHandlerModule {
|
||||
|
||||
|
||||
}
|
||||
|
||||
-8
@@ -1,8 +0,0 @@
|
||||
package land.chipmunk.parker2991.fnfboyfriendbot.modules;
|
||||
|
||||
|
||||
public class ChatModule {
|
||||
|
||||
|
||||
}
|
||||
|
||||
-8
@@ -1,8 +0,0 @@
|
||||
package land.chipmunk.parker2991.fnfboyfriendbot.modules;
|
||||
|
||||
|
||||
public class CommandCoreModule {
|
||||
|
||||
|
||||
}
|
||||
|
||||
-8
@@ -1,8 +0,0 @@
|
||||
package land.chipmunk.parker2991.fnfboyfriendbot.modules;
|
||||
|
||||
|
||||
public class CommandLoopManagerModule {
|
||||
|
||||
|
||||
}
|
||||
|
||||
-7
@@ -1,7 +0,0 @@
|
||||
package land.chipmunk.parker2991.fnfboyfriendbot.modules;
|
||||
|
||||
|
||||
public class CommandManagerModule {
|
||||
|
||||
|
||||
}
|
||||
-8
@@ -1,8 +0,0 @@
|
||||
package land.chipmunk.parker2991.fnfboyfriendbot.modules;
|
||||
|
||||
|
||||
public class ConsoleModule {
|
||||
|
||||
|
||||
}
|
||||
|
||||
-8
@@ -1,8 +0,0 @@
|
||||
package land.chipmunk.parker2991.fnfboyfriendbot.modules;
|
||||
|
||||
|
||||
public class DiscordModule {
|
||||
|
||||
|
||||
}
|
||||
|
||||
-8
@@ -1,8 +0,0 @@
|
||||
package land.chipmunk.parker2991.fnfboyfriendbot.modules;
|
||||
|
||||
|
||||
public class PlayerListModule {
|
||||
|
||||
|
||||
}
|
||||
|
||||
-7
@@ -1,7 +0,0 @@
|
||||
package land.chipmunk.parker2991.fnfboyfriendbot.modules;
|
||||
|
||||
|
||||
public class SelfcareModule {
|
||||
|
||||
|
||||
}
|
||||
-8
@@ -1,8 +0,0 @@
|
||||
package land.chipmunk.parker2991.fnfboyfriendbot.modules;
|
||||
|
||||
|
||||
public class ValidationModule {
|
||||
|
||||
|
||||
}
|
||||
|
||||
-35
@@ -1,35 +0,0 @@
|
||||
package land.chipmunk.parker2991.fnfboyfriendbot;
|
||||
import java.net.InetAddress;
|
||||
import java.net.UnknownHostException;
|
||||
|
||||
public class servershit {
|
||||
public static void main(String[] args) {
|
||||
try {
|
||||
InetAddress inetAddress = InetAddress.getLocalHost();
|
||||
System.out.println("Hostname \u203a " + inetAddress.getHostName());
|
||||
} catch (UnknownHostException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
System.out.println("Working Directory \u203a " + System.getProperty("user.dir"));
|
||||
System.out.println(System.getProperty("os.arch"));
|
||||
System.out.println("OS \u203a " + System.getProperty("os.name"));
|
||||
System.out.println("OS Version/distro \u203a " + System.getProperty("os.version"));
|
||||
System.out.println("Kernel Version \u203a " + System.getProperty("os.kernel.version"));
|
||||
System.out.println("Cores \u203a " + Runtime.getRuntime().availableProcessors());
|
||||
System.out.println("CPU \u203a " + System.getProperty("sun.cpu.isalist"));
|
||||
System.out.println("Server Free memory " + (Runtime.getRuntime().freeMemory() / 1048576) + " MiB " +
|
||||
Runtime.getRuntime().totalMemory() / 1048576 + " MiB");
|
||||
System.out.println("Device uptime \u203a " + formatUptime(System.currentTimeMillis() / 1000L));
|
||||
System.out.println("Java version \u203a " + System.getProperty("java.version"));
|
||||
}
|
||||
|
||||
private static String formatUptime(long uptime) {
|
||||
long days = uptime / 86400;
|
||||
long hours = (uptime % 86400) / 3600;
|
||||
long minutes = ((uptime % 86400) % 3600) / 60;
|
||||
long seconds = ((uptime % 86400) % 3600) % 60;
|
||||
|
||||
return days + "d " + hours + "h " + minutes + "m " + seconds + "s";
|
||||
}
|
||||
}
|
||||
-27
@@ -1,27 +0,0 @@
|
||||
package land.chipmunk.parker2991.fnfboyfriendbot;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.Arrays;
|
||||
|
||||
public class serverterminal {
|
||||
public static void main(String[] args) {
|
||||
try {
|
||||
ProcessBuilder processBuilder = new ProcessBuilder(Arrays.asList("ash", "-c", "ls"));
|
||||
Process process = processBuilder.start();
|
||||
|
||||
InputStream inputStream = process.getInputStream();
|
||||
byte[] buffer = new byte[1024];
|
||||
int bytesRead;
|
||||
while ((bytesRead = inputStream.read(buffer)) != -1) {
|
||||
System.out.println(new String(buffer, 0, bytesRead));
|
||||
}
|
||||
|
||||
int exitCode = process.waitFor();
|
||||
System.out.println("Child process close all stdio with code " + exitCode);
|
||||
} catch (IOException | InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
Commands:
|
||||
prefixes:
|
||||
- "~"
|
||||
- "fnfbfbot "
|
||||
- "&"
|
||||
- "\ufffc"
|
||||
- "\u202e"
|
||||
- "\u2588"
|
||||
@@ -1,26 +0,0 @@
|
||||
const CommandError = require('../util/command_error.js');
|
||||
module.exports = {
|
||||
name: 'json',
|
||||
trustLevel: 0,
|
||||
aliases: [
|
||||
],
|
||||
description: 'placeholder text here',
|
||||
usages: [
|
||||
],
|
||||
execute (context) {
|
||||
const bot = context.bot;
|
||||
const args = context.arguments;
|
||||
try {
|
||||
// bot.tellraw("@a", [
|
||||
// { text: `Result \u203a` },
|
||||
//JSON.parse(args.join(' ')),
|
||||
// ])
|
||||
// bot.tellraw("@a", `Result ${JSON.stringify(JSON.parse(args.join(' ')))}` )
|
||||
bot.tellraw("@a", JSON.parse(JSON.stringify(args.join(' '))))
|
||||
// console.log([ { text: `Result \u203a` }, { text: JSON.parse(args.join(' ')) } ])
|
||||
} catch (e) {
|
||||
bot.tellraw("@a", { text: e.toString(), color: "dark_red" })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,87 +0,0 @@
|
||||
const sdk = require("matrix-js-sdk");
|
||||
const { logger } = require('matrix-js-sdk/lib/logger');
|
||||
async function matrix (bot, options, config, discordClient) {
|
||||
if (!options.roomId) return
|
||||
if (!config.matrix.enabled) return
|
||||
const client = sdk.createClient({
|
||||
baseUrl: `${config.matrix.hostUrl}`,
|
||||
accessToken: `${config.matrix.token}`,
|
||||
userId: `${config.matrix.userId}`,
|
||||
})
|
||||
bot.matrix = {
|
||||
client,
|
||||
roomId: options.roomId,
|
||||
prefix: config.matrix.prefix || undefined,
|
||||
inviteUrl: config.matrix.invite || undefined
|
||||
}
|
||||
bot.matrix.client.on('Room.timeline', (event, room, toStartOfTimeline) => {
|
||||
if (event.getRoomId() !== bot.matrix.roomId
|
||||
|| event.getType() !== 'm.room.message'
|
||||
|| event.getTs() < startTime
|
||||
|| event.sender.userId === bot.matrix.client.getUserId()) return
|
||||
const content = event.getContent()
|
||||
const permissionLevel = event.sender.powerLevelNorm
|
||||
bot.tellraw("@a", [
|
||||
{
|
||||
translate: "[%s] %s \u203a %s",
|
||||
color: "gray",
|
||||
with: [
|
||||
{
|
||||
translate: "%s%s%s %s",
|
||||
with: [
|
||||
{
|
||||
text: "FNF",
|
||||
color: "blue",
|
||||
},
|
||||
{
|
||||
text: "Boyfriend",
|
||||
color: "dark_aqua",
|
||||
},
|
||||
{
|
||||
text: "Bot",
|
||||
color: "dark_blue",
|
||||
},
|
||||
{
|
||||
text: "Matrix",
|
||||
color: "#0dbd8b"
|
||||
}
|
||||
],
|
||||
// clickEvent: config.matrix.invite ? { action: 'open_url', value: config.matrix.invite } : undefined,
|
||||
// hoverEvent: { action: 'show_text', contents: 'Click to join the matrix' }
|
||||
},
|
||||
{
|
||||
// text: event.sender.rawDisplayName || event.sender.name || event.sender.userId
|
||||
},
|
||||
// content.body
|
||||
event.getContent().body,
|
||||
]
|
||||
}
|
||||
])
|
||||
console.log(
|
||||
// the room name will update with m.room.name events automatically
|
||||
"(%s) %s :: %s",
|
||||
room.name,
|
||||
event.getSender(),
|
||||
event.getContent().body,
|
||||
)
|
||||
})
|
||||
bot.on('message', (message) => {
|
||||
const stringMessage = bot.getMessageAsPrismarine(message)?.toString()
|
||||
const content = {
|
||||
body: '```ansi' + stringMessage + '```',
|
||||
msgtype: "m.text",
|
||||
}
|
||||
let queue = [];
|
||||
setInterval(() => {
|
||||
// if (queue.length === 0) return
|
||||
try {
|
||||
bot.matrix.client.sendEvent(bot.options.roomId, 'm.room.message', content);
|
||||
} catch (e) {
|
||||
bot.console.logs(error.toString());
|
||||
}
|
||||
queue = [];
|
||||
}, 5000)
|
||||
})
|
||||
await client.startClient()
|
||||
}
|
||||
module.exports = matrix;
|
||||
@@ -1,9 +0,0 @@
|
||||
const { request } = require("undici");
|
||||
// https://en.wikipedia.org/w/api.php
|
||||
async function sus () {
|
||||
const query = new URLSearchParams("sus");
|
||||
const wikiResult = await request(`https://en.wikipedia.org/wiki/sus`);
|
||||
const result = await wikiResult.body;
|
||||
console.log((await result.json()))
|
||||
}
|
||||
sus()
|
||||
@@ -2,7 +2,7 @@
|
||||
* This file was generated by the Gradle 'init' task.
|
||||
*
|
||||
* The settings file is used to specify which projects to include in your build.
|
||||
* For more detailed information on multi-project builds, please refer to https://docs.gradle.org/8.5/userguide/building_swift_projects.html in the Gradle documentation.
|
||||
* For more detailed information on multi-project builds, please refer to https://docs.gradle.org/9.4.0/userguide/multi_project_builds.html in the Gradle documentation.
|
||||
*/
|
||||
|
||||
rootProject.name = 'fnfboyfriendbot'
|
||||
rootProject.name = "NitoriBot"
|
||||
@@ -1,5 +0,0 @@
|
||||
1. add discord hashes back to the bot (v6.0.0-beta)
|
||||
2. add a reset interval to cloops (v6.0.0-beta)
|
||||
3. finish useChat (v6.0.1)
|
||||
4. finish isSavage (v6.0.2)
|
||||
5. start working on isCreayun (v6.0.7) fuck you creayun
|
||||
-71
@@ -1,71 +0,0 @@
|
||||
const mc = require('minecraft-protocol')
|
||||
const { EventEmitter } = require('events')
|
||||
//require("events").EventEmitter.defaultMaxListeners = Infinity;
|
||||
EventEmitter.defaultMaxListeners = Infinity
|
||||
const util = require('util');
|
||||
function createBot(options = {}, config) {
|
||||
const bot = new EventEmitter();
|
||||
bot.options = {
|
||||
// Set some default values in options
|
||||
host: options.host ??= 'localhost',
|
||||
username: options.username ??= 'Player',
|
||||
hideErrors: options.hideErrors ??= true, // HACK: Hide errors by default as a lazy fix to console being spammed with them
|
||||
};
|
||||
bot.options = options;
|
||||
const ChatMessage = require('prismarine-chat')(bot.options.version);
|
||||
// Create our client object, put it on the bot, and register some events
|
||||
bot.on('init_client', client => {
|
||||
client.on('packet', (data, meta) => {
|
||||
bot.emit('packet', data, meta)
|
||||
bot.emit('packet.' + meta.name, data)
|
||||
})
|
||||
|
||||
client.on('login', () => {
|
||||
bot.uuid = client.uuid
|
||||
bot.username = client.username
|
||||
})
|
||||
client.on('disconnect', (data) => {
|
||||
bot.emit("disconnect", data)
|
||||
// bot.console.info(JSON.stringify(data))
|
||||
// bot?.discord?.channel?.send(util.inspect(data.reason))
|
||||
if (config.console.filelogger) {
|
||||
// bot?.console?.filelogging(`[${new Date().toLocaleTimeString("en-US", { timeZone: "America/CHICAGO", })} ${new Date().toLocaleDateString("en-US", { timeZone: "America/CHICAGO", })} logs] [${options.serverName}] ` + '[Client Reconnect] ' + util.inspect(data.reason))
|
||||
}
|
||||
})
|
||||
client.on('end', reason => {
|
||||
bot.emit('end', reason);
|
||||
})
|
||||
|
||||
client.on('error', error => {
|
||||
bot.console.warn(ChatMessage.fromNotch('§8[§bClient Reconnect§8]§r ')?.toAnsi() + util.inspect(error.toString()))
|
||||
// bot?.discord?.channel?.send(error.toString())
|
||||
if (config.console.filelogger) {
|
||||
// bot?.console?.filelogging(`[${new Date().toLocaleTimeString("en-US", { timeZone: "America/CHICAGO", })} ${new Date().toLocaleDateString("en-US", { timeZone: "America/CHICAGO", })} logs] [${options.serverName}] ` + '[Client Reconnect] ' + util.inspect(error.toString()))
|
||||
}
|
||||
})
|
||||
|
||||
client.on("keep_alive", ({ keepAliveId }) => {
|
||||
bot.emit("keep_alive", { keepAliveId })
|
||||
})
|
||||
|
||||
client.on('kick_disconnect', (data) => {
|
||||
bot.emit("kick_disconnect", data.reason)
|
||||
bot.console?.warn(ChatMessage.fromNotch(`§8[§bClient Reconnect§8]§r `)?.toAnsi() + util.inspect(data.reason))
|
||||
bot?.discord?.channel?.send(util.inspect(data.reason))
|
||||
if (config.console.filelogger) {
|
||||
// bot?.console?.filelogging(`[${new Date().toLocaleTimeString("en-US", { timeZone: "America/CHICAGO", })} ${new Date().toLocaleDateString("en-US", { timeZone: "America/CHICAGO", })} logs] [${options.serverName}] ` + '[Client Reconnect] ' + util.inspect(data.reason))
|
||||
}
|
||||
})
|
||||
|
||||
process.on("uncaughtException", (e) => {
|
||||
// console?.warn(e.stack)
|
||||
});
|
||||
})
|
||||
|
||||
const client = options.client ?? new mc.createClient(options)
|
||||
bot._client = client
|
||||
bot.emit('init_client', client)
|
||||
bot.bots = options.bots ?? [bot]
|
||||
return bot
|
||||
}
|
||||
module.exports = createBot
|
||||
@@ -1,58 +0,0 @@
|
||||
const bots = require('../data/bots.json');
|
||||
const CommandError = require('../util/command_error')
|
||||
module.exports = {
|
||||
name: "bots",
|
||||
description: ["shows a list of known bots"],
|
||||
aliases: ["knownbots"],
|
||||
trustLevel: 0,
|
||||
usage:[""],
|
||||
async execute(context) {
|
||||
const query = context.arguments.join(" ").toLowerCase();
|
||||
const bot = context.bot;
|
||||
if (query.length === 0) {
|
||||
const list = [];
|
||||
for (const info of bots) {
|
||||
if (list.length !== 0) {
|
||||
list.push({ text: ", ", color: "gray" });
|
||||
}
|
||||
list.push(info.name);
|
||||
|
||||
}
|
||||
bot.tellraw("@a",
|
||||
["Known bots (", { text: JSON.stringify(bots.length), color: 'gold' }, { text: ") - ", color: 'gray' }, ...list],
|
||||
false,
|
||||
);
|
||||
return;
|
||||
}
|
||||
for (const info of bots) {
|
||||
const plainName = String(
|
||||
context.bot.getMessageAsPrismarine(info.name),
|
||||
).toLowerCase();
|
||||
if (plainName.includes(query)) this.sendBotInfo(info, context.bot);
|
||||
}
|
||||
},
|
||||
|
||||
sendBotInfo(info, bot) {
|
||||
const component = [""];
|
||||
component.push("Name: ", info.name);
|
||||
if (info.exclaimer) component.push("\n", "Exclaimer: ", info.exclaimer);
|
||||
if (info.authors && info.authors.length !== 0) {
|
||||
component.push("\n", "Authors: ");
|
||||
for (const author of info.authors) {
|
||||
component.push(author, { text: ", ", color: "gray" });
|
||||
}
|
||||
component.pop();
|
||||
}
|
||||
if (info.foundation) component.push("\n", "Foundation: ", info.foundation);
|
||||
if (info.prefixes && info.prefixes.length !== 0) {
|
||||
component.push("\n", "Prefixes: ");
|
||||
for (const prefix of info.prefixes) {
|
||||
component.push(prefix, { text: ", ", color: "gray" });
|
||||
}
|
||||
component.pop();
|
||||
}
|
||||
bot.tellraw("@a", [component]);
|
||||
},
|
||||
};
|
||||
//it doing it just for the ones i added lol
|
||||
// prob a replit moment, it probably thinks there are regexes in the strings
|
||||
@@ -1,158 +0,0 @@
|
||||
const { EmbedBuilder } = require('discord.js');
|
||||
const CommandError = require('../util/command_error');
|
||||
module.exports = {
|
||||
name: 'cloop',
|
||||
trustLevel: 1,
|
||||
aliases: [
|
||||
"commandloop"
|
||||
],
|
||||
description: 'run cloops',
|
||||
usages: [
|
||||
"add <interval> <command>",
|
||||
"remove <index>",
|
||||
"clear",
|
||||
"list",
|
||||
],
|
||||
execute (context) {
|
||||
const args = context.arguments
|
||||
const bot = context.bot
|
||||
const source = context.source
|
||||
if (!args && !args[0] && !args[1] && !args[2] && !args[3]) return
|
||||
switch (args[1]) {
|
||||
case 'add':
|
||||
if (parseInt(args[2]) === NaN) bot.tellraw(`@a[name="${source?.player?.profile?.name}"]`, { text: 'Invalid interval', color: 'red' })
|
||||
const interval = parseInt(args[2])
|
||||
const command = args.slice(3).join(' ');
|
||||
bot.cloop.add(command, interval)
|
||||
|
||||
bot.tellraw(`@a[name="${source?.player?.profile?.name}"]`, {
|
||||
translate: 'Added \'%s\' with interval %s to the cloops',
|
||||
color: 'gray',
|
||||
with: [ command, { text: `${interval}`, color: 'gold' } ]
|
||||
})
|
||||
break
|
||||
case 'remove':
|
||||
if (parseInt(args[2]) === NaN) bot.tellraw(`@a[name="${source?.player?.profile?.name}"]`, { text: 'Invalid index', color: 'red' })
|
||||
|
||||
const index = parseInt(args[2])
|
||||
|
||||
bot.cloop.remove(index)
|
||||
|
||||
bot.tellraw(`@a[name="${source?.player?.profile?.name}"]`, {
|
||||
translate: 'Removed cloop %s',
|
||||
color: 'gray',
|
||||
with: [ { text: `${index}`, color: 'gold' } ]
|
||||
})
|
||||
break
|
||||
case 'clear':
|
||||
bot.cloop.clear()
|
||||
|
||||
bot.tellraw(`@a[name="${source?.player?.profile?.name}"]`, { text: 'Cleared all cloops' })
|
||||
break
|
||||
case 'list':
|
||||
const component = []
|
||||
|
||||
const listComponent = []
|
||||
let i = 0
|
||||
for (const cloop of bot.cloop.list) {
|
||||
listComponent.push({
|
||||
translate: '%s \u203a %s (%s)',
|
||||
color: 'gray',
|
||||
with: [
|
||||
{ text: `${i}`, color: 'gold' },
|
||||
cloop.command,
|
||||
{ text: `${cloop.interval}`, color: 'gold'},
|
||||
]
|
||||
})
|
||||
listComponent.push('\n')
|
||||
i++
|
||||
}
|
||||
|
||||
listComponent.pop()
|
||||
|
||||
component.push({
|
||||
translate: 'Cloops (%s):',
|
||||
with: [ { text: `${bot.cloop.list.length}`, color: 'gold' } ]
|
||||
})
|
||||
component.push('\n')
|
||||
component.push(listComponent)
|
||||
if (bot.cloop.list.length === 0) {
|
||||
bot.tellraw(`@a[name="${source?.player.profile?.name}"]`, {
|
||||
translate: 'Cloops (%s):',
|
||||
color: 'gray',
|
||||
with: [ { text: `${bot.cloop.list.length}`, color: 'gold' } ]
|
||||
})
|
||||
} else {
|
||||
bot.tellraw(`@a[name="${source?.player?.profile?.name}"]`, component)
|
||||
}
|
||||
break
|
||||
default:
|
||||
bot.tellraw(`@a[name="${source?.player?.profile?.name}"]`, { text: 'Invalid action', color: 'red' })
|
||||
break
|
||||
}
|
||||
},
|
||||
discordExecute (context) {
|
||||
const bot = context.bot;
|
||||
const args = context.arguments;
|
||||
let Embed;
|
||||
switch (args[0]) {
|
||||
case "add":
|
||||
const interval = parseInt(args[1])
|
||||
const command = args.slice(2).join(' ')
|
||||
bot.cloop.add(command, interval)
|
||||
Embed = new EmbedBuilder()
|
||||
.setColor(`${config.colors.discord.embed}`)
|
||||
.setTitle(`${this.name} Command`)
|
||||
.setDescription(`Added ${command} with the interval ${interval} to the cloops`)
|
||||
bot?.discord?.message?.reply({ embeds: [Embed] })
|
||||
break;
|
||||
case "remove":
|
||||
var index = (args[1])
|
||||
if (parseInt(args[1]) === NaN) throw new CommandError("invalid index");
|
||||
bot.cloop.remove(index)
|
||||
Embed = new EmbedBuilder()
|
||||
.setColor(`${config.colors.discord.embed}`)
|
||||
.setTitle(`${this.name} Command`)
|
||||
.setDescription(`removed cloop ${index}`)
|
||||
bot?.discord?.message?.reply({ embeds: [Embed] })
|
||||
break
|
||||
case 'clear':
|
||||
bot.cloop.clear()
|
||||
Embed = new EmbedBuilder()
|
||||
.setColor(`${config.colors.discord.embed}`)
|
||||
.setTitle(`${this.name} Command`)
|
||||
.setDescription(`cleared cloops`)
|
||||
bot?.discord?.message?.reply({ embeds: [Embed] })
|
||||
break
|
||||
case 'list':
|
||||
const component = []
|
||||
const listComponent = []
|
||||
let i = 0
|
||||
for (const cloop of bot.cloop.list) {
|
||||
listComponent.push({
|
||||
translate: '%s \u203a %s (%s)',
|
||||
with: [
|
||||
`id ${i}`,
|
||||
cloop.command,
|
||||
cloop.interval
|
||||
]
|
||||
})
|
||||
listComponent.push('\n')
|
||||
i++
|
||||
}
|
||||
listComponent.pop()
|
||||
component.push({
|
||||
translate: 'Cloops (%s):',
|
||||
with: [ bot.cloop.list.length ]
|
||||
})
|
||||
component.push('\n')
|
||||
component.push(listComponent)
|
||||
Embed = new EmbedBuilder()
|
||||
.setColor(`${config.colors.discord.embed}`)
|
||||
.setTitle(`${this.name} Command`)
|
||||
.setDescription(bot.getMessageAsPrismarine(component)?.toString())
|
||||
bot?.discord?.message?.reply({ embeds: [Embed] })
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,89 +0,0 @@
|
||||
module.exports = {
|
||||
name: 'console',
|
||||
trustLevel: 4,
|
||||
aliases: [
|
||||
|
||||
],
|
||||
execute (context) {
|
||||
const bot = context.bot
|
||||
const args = context.arguments;
|
||||
const source = context.source;
|
||||
if (!args && !args[0] && !args[1] && !args[2] && !args[3]) return;
|
||||
switch (args[0]?.toLowerCase()) {
|
||||
case "server":
|
||||
case "svr":
|
||||
const servers = bot.bots.map(eachBot => eachBot.options.serverName);
|
||||
for (const eachBot of bot.bots) {
|
||||
if (args.slice(1).join(' ').toLowerCase() === 'all') {
|
||||
eachBot.console.server = 'all'
|
||||
bot.console.info("Set the console server to all");
|
||||
continue
|
||||
}
|
||||
const server = servers.find(server => server.toLowerCase().includes(args[1]))
|
||||
if (!server) {
|
||||
bot.console.info("Invalid server");
|
||||
return
|
||||
}
|
||||
bot.console.info(`Set the console server to ` + server);
|
||||
eachBot.console.server = server;
|
||||
}
|
||||
break
|
||||
case 'customchat':
|
||||
if (args[1] === 'off' || args[1] === 'false' || args[1] === 'disable') {
|
||||
bot.console.customChat.enabled = false
|
||||
bot.console.info('Custom Chat disabled');
|
||||
} if (args[1] === 'on' || args[1] === 'true' || args[1] === 'enable') {
|
||||
bot.console.customChat.enabled = true;
|
||||
bot.console.info('Custom Chat enabled');
|
||||
}
|
||||
break
|
||||
case 'say':
|
||||
if (!bot.console.customChat.enabled) {
|
||||
bot.commandManager.executeString(bot.console.source, `echo ${args.slice(1).join(' ')}`)
|
||||
} else if (bot.console.customChat.enabled) {
|
||||
if (args.slice(1).join(' ').startsWith('/')) {
|
||||
bot.chat.command(`${args.slice(1).join(' ').substring(1)}`)
|
||||
return;
|
||||
}
|
||||
bot.console.customChat.chat(args.slice(1).join(' '));
|
||||
}
|
||||
|
||||
break
|
||||
case "validate":
|
||||
case "validation":
|
||||
case "val":
|
||||
// bot.chat.message(`${config.prefixes[0]}${args.slice(1).shift()} ${bot.validation.owner} ${args.slice(2).join(' ')}`)
|
||||
switch (args[1]?.toLowerCase()) {
|
||||
case "owner":
|
||||
case "o":
|
||||
if (bot.console.customChat.enabled) {
|
||||
bot.console.customChat.chat(`${config.prefixes[0]}${args.slice(2).shift()} ${bot.validation.owner} ${args.slice(3).join(' ')}`)
|
||||
} else if (!bot.console.customChat.enabled) {
|
||||
bot.chat.message(`${config.prefixes[0]}${args.slice(2).shift()} ${bot.validation.owner} ${args.slice(3).join(' ')}`)
|
||||
}
|
||||
break
|
||||
case "admin":
|
||||
case "a":
|
||||
if (bot.console.customChat.enabled) {
|
||||
bot.console.customChat.chat(`${config.prefixes[0]}${args.slice(2).shift()} ${bot.validation.admin} ${args.slice(3).join(' ')}`)
|
||||
} else if (!bot.console.customChat.enabled) {
|
||||
bot.chat.message(`${config.prefixes[0]}${args.slice(2).shift()} ${bot.validation.admin} ${args.slice(3).join(' ')}`)
|
||||
}
|
||||
break
|
||||
case "trusted":
|
||||
case "t":
|
||||
if (bot.console.customChat.enabled) {
|
||||
bot.console.customChat.chat(`${config.prefixes[0]}${args.slice(2).shift()} ${bot.validation.owner} ${args.slice(3).join(' ')}`);
|
||||
} else if (!bot.console.customChat.enabled) {
|
||||
bot.chat.message(`${config.prefixes[0]}${args.slice(2).shift()} ${bot.validation.trusted} ${args.slice(3).join(' ')}`);
|
||||
}
|
||||
break
|
||||
default:
|
||||
bot.chat.message(bot.getMessageAsPrismarine({ translate: "command.unknown.argument", color: "dark_red" })?.toMotd().replaceAll("§","&"))
|
||||
}
|
||||
break
|
||||
default:
|
||||
bot.chat.message(bot.getMessageAsPrismarine({ translate: "command.unknown.argument", color: "dark_red" })?.toMotd().replaceAll("§","&"))
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
const CommandError = require('../util/command_error')
|
||||
|
||||
module.exports = {
|
||||
name: 'core',
|
||||
trustLevel: 0,
|
||||
aliases: [
|
||||
"cb",
|
||||
"corerun",
|
||||
"commandcorerun",
|
||||
],
|
||||
description: 'run commands in core!',
|
||||
usages: [
|
||||
"<command>",
|
||||
],
|
||||
execute (context) {
|
||||
const bot = context.bot
|
||||
const message = context.arguments.join(' ');
|
||||
bot.core.run(message)
|
||||
},
|
||||
discordExecute (context) {
|
||||
const bot = context.bot;
|
||||
const args = context.arguments;
|
||||
bot.core.run(args.join(' '));
|
||||
}
|
||||
}
|
||||
@@ -1,78 +0,0 @@
|
||||
const cowsay = require('cowsay2');
|
||||
const cows = require('cowsay2/cows');
|
||||
const { EmbedBuilder } = require('discord.js');
|
||||
const fixansi = require('../util/ansi');
|
||||
module.exports = {
|
||||
name: 'cowsay',
|
||||
trustLevel: 0,
|
||||
aliases: [
|
||||
],
|
||||
description: 'amogus',
|
||||
usages: [
|
||||
"just wait till the command is ready :3"
|
||||
],
|
||||
execute (context) {
|
||||
const bot = context.bot;
|
||||
const args = context.arguments;
|
||||
const source = context.source;
|
||||
if (args[0]?.toLowerCase() === "list") {
|
||||
const list = Object.keys(cows);
|
||||
let content = [];
|
||||
let color = true;
|
||||
for (const value of list) {
|
||||
content.push([
|
||||
{
|
||||
text: value + ' ',
|
||||
color: (!((color = !color)) ? 'blue' : 'dark_blue'),
|
||||
}
|
||||
])
|
||||
}
|
||||
bot.tellraw(`@a[name="${source?.player?.profile?.name}"]`, content)
|
||||
} else if (cows[args[0]]) {
|
||||
bot.tellraw(`@a[name="${source?.player?.profile?.name}"]`, {
|
||||
text: cowsay.say(args.slice(1).join(' '),
|
||||
{ cow: cows[args[0]] })
|
||||
})
|
||||
} else {
|
||||
bot.tellraw(`@a[name="${source?.player?.profile?.name}"]`, { text: cowsay.say(args.slice(0).join(' ')) })
|
||||
}
|
||||
},
|
||||
discordExecute (context) {
|
||||
const bot = context.bot;
|
||||
const args = context.arguments;
|
||||
let Embed
|
||||
if (args[0] === "list") {
|
||||
const list = Object.keys(cows);
|
||||
let content = [];
|
||||
let color = true;
|
||||
for (const value of list) {
|
||||
content.push([
|
||||
{
|
||||
text: value + ' ',
|
||||
}
|
||||
])
|
||||
}
|
||||
const ansiList = bot.getMessageAsPrismarine(content)?.toString();
|
||||
const fixAnsiList = fixansi(ansiList.replaceAll('`', '`\u200b'))
|
||||
Embed = new EmbedBuilder()
|
||||
.setColor(`${config.colors.discord.embed}`)
|
||||
.setTitle(`${this.name} Command`)
|
||||
.setDescription(`\`\`\`ansi\n${fixAnsiList}\n\`\`\``)
|
||||
bot.discord.message.reply({ embeds: [Embed] })
|
||||
} else if (cows[args[0]]) {
|
||||
const ansiCow1 = bot.getMessageAsPrismarine({ text: cowsay.say(args.slice(1).join(' '), { cow: cows[args[0]] }) })?.toAnsi()
|
||||
const fixAnsiCow1 = fixansi(ansiCow1.replaceAll('`', '`\u200b'))
|
||||
Embed = new EmbedBuilder()
|
||||
.setColor(`${config.colors.discord.embed}`)
|
||||
.setTitle(`${this.name} Command`)
|
||||
.setDescription(`\`\`\`ansi\n${fixAnsiCow1}\n\`\`\``)
|
||||
bot.discord.message.reply({ embeds: [Embed] })
|
||||
} else {
|
||||
Embed = new EmbedBuilder()
|
||||
.setColor(`${config.colors.discord.embed}`)
|
||||
.setTitle(`${this.name} Command`)
|
||||
.setDescription(`\`\`\`ansi\n${cowsay.say(args.slice(0).join(' '))}\n\`\`\``)
|
||||
bot.discord.message.reply({ embeds: [Embed] });
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
module.exports = {
|
||||
name: 'echo',
|
||||
trustLevel: 0,
|
||||
aliases: [
|
||||
"say",
|
||||
"botsay",
|
||||
],
|
||||
description: 'Make me say something',
|
||||
usages: [
|
||||
"<message>"
|
||||
],
|
||||
execute (context) {
|
||||
const bot = context.bot
|
||||
const message = context.arguments.join(' ')
|
||||
if (message.startsWith('/')) {
|
||||
bot.chat.command(message.substring(1))
|
||||
return
|
||||
}
|
||||
// if
|
||||
bot.chat.message(message)
|
||||
},
|
||||
discordExecute (context) {
|
||||
const bot = context.bot;
|
||||
const args = context.arguments;
|
||||
if (args.join(' ').startsWith('/')) {
|
||||
bot.chat.command(args.join(' ').substring(1))
|
||||
return
|
||||
}
|
||||
bot.chat.message(args.join(' '))
|
||||
}
|
||||
}
|
||||
@@ -1,373 +0,0 @@
|
||||
const CommandError = require('../util/command_error');
|
||||
const sleep = require('../util/sleep.js');
|
||||
const fixansi = require('../util/ansi');
|
||||
const { EmbedBuilder } = require('discord.js');
|
||||
module.exports = {
|
||||
name: 'help',
|
||||
trustLevel: 0,
|
||||
aliases: [
|
||||
"heko",
|
||||
"?",
|
||||
"cmds",
|
||||
"hell",
|
||||
"hello",
|
||||
"helo",
|
||||
"commands",
|
||||
"commandshelp",
|
||||
|
||||
],
|
||||
description: 'a list of the bots commands',
|
||||
usages: [
|
||||
"",
|
||||
"<command>",
|
||||
],
|
||||
execute (context) {
|
||||
const commandList = [];
|
||||
const bot = context.bot;
|
||||
const source = context.source;
|
||||
const args = context.arguments;
|
||||
const category = {
|
||||
translate: '(%s%s%s%s%s%s%s) \u203a ',
|
||||
bold: false,
|
||||
color: 'gray',
|
||||
with: [
|
||||
{ color: "aqua", text: 'Public'},
|
||||
{ color: "gray", text: ' | '},
|
||||
{ color: "dark_aqua", text: 'Trusted'},
|
||||
{ color: 'gray', text: ' | '},
|
||||
{ color: "blue", text: "Admin" },
|
||||
{ color: "gray", text: " | " },
|
||||
{ color: "dark_blue", text: 'Owner'},
|
||||
]
|
||||
}
|
||||
let public = [];
|
||||
let trusted = [];
|
||||
let admin = [];
|
||||
let owner = [];
|
||||
for (const command of bot.commandManager.commandlist) {
|
||||
if (args[0] === command.name) {
|
||||
bot.tellraw(`@a[name="${source?.player?.profile?.name}"]`, [
|
||||
{
|
||||
text: `CommandName \u203a ${command.name}\n`,
|
||||
color: 'gray',
|
||||
},
|
||||
{
|
||||
text: `Aliases \u203a ${command.aliases}\n`,
|
||||
color: 'gray',
|
||||
},
|
||||
{
|
||||
text: `Description \u203a ${command.description}\n`,
|
||||
color: 'gray',
|
||||
},
|
||||
{
|
||||
text: `trustLevel \u203a `,
|
||||
//${command.trustLevel}\n`,
|
||||
color: 'gray'
|
||||
},
|
||||
{
|
||||
text: `${command.trustLevel}\n`,
|
||||
color: 'gold'
|
||||
},
|
||||
{
|
||||
text: "Usages \u203a\n",
|
||||
color: "gray"
|
||||
},
|
||||
]);
|
||||
for (const usageArray of command.usages) {
|
||||
bot.tellraw(`@a[name="${source?.player?.profile?.name}"]`, { text: `${config.prefixes[0]}${command.name} ${usageArray}`, color: 'gray' })
|
||||
}
|
||||
return
|
||||
}
|
||||
if (command.trustLevel === 0) {
|
||||
public.push([
|
||||
{
|
||||
text: command.name + ' ',
|
||||
color: "aqua",
|
||||
translate: "",
|
||||
hoverEvent: {
|
||||
action: "show_text",
|
||||
value: [
|
||||
{
|
||||
text: `Command:${command.name}\n`,
|
||||
color: 'gray'
|
||||
},
|
||||
{
|
||||
text: `Trust Level: `,
|
||||
color: 'gray'
|
||||
},
|
||||
{
|
||||
text: `${command.trustLevel}\n`,
|
||||
color: 'gold'
|
||||
},
|
||||
{
|
||||
text: `${command.description}\n`,
|
||||
color: 'gray'
|
||||
},
|
||||
{
|
||||
text: `Command Aliases: ${command.aliases}\n`,
|
||||
color: 'gray'
|
||||
},
|
||||
{
|
||||
text: 'click on me to use me :)',
|
||||
color: 'gray',
|
||||
},
|
||||
],
|
||||
},
|
||||
clickEvent: {
|
||||
action: 'run_command',
|
||||
value: `${config.prefixes[0]}${command?.name}`
|
||||
}
|
||||
}
|
||||
])
|
||||
} else if (command.trustLevel === 1) {
|
||||
trusted.push([
|
||||
{
|
||||
text: command.name + ' ',
|
||||
color: "dark_aqua",
|
||||
translate: "",
|
||||
hoverEvent: {
|
||||
action: "show_text",
|
||||
value: [
|
||||
{
|
||||
text: `Command:${command.name}\n`,
|
||||
color: 'gray'
|
||||
},
|
||||
{
|
||||
text: `Trust Level: `,
|
||||
color: 'gray'
|
||||
},
|
||||
{
|
||||
text: `${command.trustLevel}\n`,
|
||||
color: 'gold'
|
||||
},
|
||||
{
|
||||
text: `${command.description}\n`,
|
||||
color: 'gray'
|
||||
},
|
||||
{
|
||||
text: `Command Aliases: ${command.aliases}\n`,
|
||||
color: 'gray'
|
||||
},
|
||||
{
|
||||
text: 'click on me to use me :)',
|
||||
color: 'gray',
|
||||
},
|
||||
],
|
||||
},
|
||||
clickEvent: {
|
||||
action: 'run_command',
|
||||
value: `${config.prefixes[0]}${command?.name}`
|
||||
}
|
||||
}
|
||||
])
|
||||
} else if (command.trustLevel === 2) {
|
||||
admin.push([
|
||||
{
|
||||
text: command.name + ' ',
|
||||
color: "blue",
|
||||
translate: "",
|
||||
hoverEvent: {
|
||||
action:"show_text",
|
||||
value: [
|
||||
{
|
||||
text: `Command:${command.name}\n`,
|
||||
color: 'gray'
|
||||
},
|
||||
{
|
||||
text: `Trust Level: `,
|
||||
color: 'gray'
|
||||
},
|
||||
{
|
||||
text: `${command.trustLevel}\n`,
|
||||
color: 'gold'
|
||||
},
|
||||
{
|
||||
text: `${command.description}\n`,
|
||||
color: 'gray'
|
||||
},
|
||||
{
|
||||
text: `Command Aliases: ${command.aliases}\n`,
|
||||
color: 'gray'
|
||||
},
|
||||
{
|
||||
text: 'click on me to use me :)',
|
||||
color: 'gray',
|
||||
},
|
||||
],
|
||||
},
|
||||
clickEvent: {
|
||||
action: 'run_command',
|
||||
value: `${config.prefixes[0]}${command?.name}`
|
||||
}
|
||||
}
|
||||
])
|
||||
} else if (command.trustLevel === 3) {
|
||||
owner.push([
|
||||
{
|
||||
text: command.name + ' ',
|
||||
color: "dark_blue",
|
||||
translate: "",
|
||||
hoverEvent: {
|
||||
action: "show_text",
|
||||
value: [
|
||||
{
|
||||
text: `Command:${command.name}\n`,
|
||||
color: 'gray'
|
||||
},
|
||||
{
|
||||
text: `Trust Level: `,
|
||||
color: 'gray'
|
||||
},
|
||||
{
|
||||
text: `${command.trustLevel}\n`,
|
||||
color: 'gold'
|
||||
},
|
||||
{
|
||||
text: `${command.description}\n`,
|
||||
color: 'gray'
|
||||
},
|
||||
{
|
||||
text: `Command Aliases: ${command.aliases}\n`,
|
||||
color: 'gray'
|
||||
},
|
||||
{
|
||||
text: 'click on me to use me :)',
|
||||
color: 'gray',
|
||||
},
|
||||
],
|
||||
},
|
||||
clickEvent: {
|
||||
action: 'run_command',
|
||||
value: `${config.prefixes[0]}${command?.name}`
|
||||
}
|
||||
}
|
||||
])
|
||||
}
|
||||
}
|
||||
const length = bot.commandManager.commandlist.filter(c => c.trustLevel != 4).length
|
||||
if (bot.options.useChat) {
|
||||
bot.chat.message(bot.getMessageAsPrismarine([
|
||||
{
|
||||
text: 'Commands (',
|
||||
color: 'gray'
|
||||
},
|
||||
{
|
||||
text: length,
|
||||
color: 'gold'
|
||||
},
|
||||
{
|
||||
text: ') ',
|
||||
color: 'gray'
|
||||
},
|
||||
category,
|
||||
])?.toMotd().replaceAll('§','&'))
|
||||
setTimeout(() => {
|
||||
bot.chat.message(bot.getMessageAsPrismarine(public)?.toMotd().replaceAll("§","&"))
|
||||
}, 200)
|
||||
setTimeout(() => {
|
||||
bot.chat.message(bot.getMessageAsPrismarine(trusted)?.toMotd().replaceAll("§","&"));
|
||||
}, 200)
|
||||
setTimeout(() => {
|
||||
bot.chat.message(bot.getMessageAsPrismarine(admin)?.toMotd()?.replaceAll('§','&'))
|
||||
}, 200)
|
||||
setTimeout(() => {
|
||||
bot.chat.message(bot.getMessageAsPrismarine(owner).toMotd().replaceAll("§","&"));
|
||||
}, 200)
|
||||
} else if (admin.length === 0) {
|
||||
bot.tellraw(`@a[name="${source?.player?.profile?.name}"]`, [
|
||||
{ text: 'Commands (', color: 'gray' },
|
||||
{ text: JSON.stringify(length), color: 'gold' },
|
||||
{ text: ') ', color: 'gray' },
|
||||
category,
|
||||
'\n',
|
||||
public,
|
||||
trusted,
|
||||
owner
|
||||
])
|
||||
} else {
|
||||
bot.tellraw(`@a[name="${source?.player?.profile?.name}"]`, [
|
||||
{ text: 'Commands (', color: 'gray' },
|
||||
{ text: JSON.stringify(length), color: 'gold' },
|
||||
{ text: ') ', color: 'gray' },
|
||||
category,
|
||||
'\n',
|
||||
public,
|
||||
trusted,
|
||||
admin,
|
||||
owner
|
||||
])
|
||||
}
|
||||
},
|
||||
discordExecute (context) {
|
||||
const bot = context.bot;
|
||||
const args = context.arguments;
|
||||
const category = {
|
||||
translate: '(%s%s%s%s%s%s%s) \u203a ',
|
||||
bold: false,
|
||||
color: 'gray',
|
||||
with: [
|
||||
{ color: "aqua", text: 'Public'},
|
||||
{ color: "gray", text: ' | '},
|
||||
{ color: "dark_aqua", text: 'Trusted'},
|
||||
{ color: 'gray', text: ' | '},
|
||||
{ color: 'blue', text: 'Admin' },
|
||||
{ color: 'gray', text: ' | ' },
|
||||
{ color: "dark_blue", text: 'Owner'},
|
||||
]
|
||||
}
|
||||
let public = [];
|
||||
let trusted = [];
|
||||
let admin = [];
|
||||
let owner = [];
|
||||
for (const command of bot.commandManager.commandlist) {
|
||||
if (args[0] === command.name) {
|
||||
const ansi = bot.getMessageAsPrismarine([ { text: `CommandName \u203a ${command.name}\n`, color: 'gray', }, { text: `Aliases \u203a ${command.aliases}\n`, color: 'gray', }, { text: `Description \u203a ${command.description}\n`, color: 'gray', }, { text: `trustLevel \u203a ${command.trustLevel}\n`, color: 'gray' }, { text: `Usages \u203a ${command?.usages}`, color: "dark_gray" }, ])?.toAnsi().replaceAll('```\u001b[9```' + '```\u001b[3```')
|
||||
const fix = fixansi(ansi.replaceAll('`', '`\u200b'))
|
||||
const Embed = new EmbedBuilder()
|
||||
.setColor(`${config.colors.discord.embed}`)
|
||||
.setTitle(`${this.name} Command`)
|
||||
.setDescription(`\`\`\`ansi\n${fix}\n\`\`\``)
|
||||
bot.discord.message.reply({ embeds: [Embed] })
|
||||
return
|
||||
}
|
||||
if (command?.trustLevel === 0) {
|
||||
public.push([
|
||||
{
|
||||
text: command.name + ' ',
|
||||
color: "aqua",
|
||||
}
|
||||
])
|
||||
} else if (command?.trustLevel === 1) {
|
||||
trusted.push([
|
||||
{
|
||||
text: command.name + ' ',
|
||||
color: "dark_aqua"
|
||||
}
|
||||
])
|
||||
} else if (command?.trustLevel === 2) {
|
||||
admin.push([
|
||||
{
|
||||
text: command.name + ' ',
|
||||
color: 'blue'
|
||||
}
|
||||
])
|
||||
} else if (command?.trustLevel === 3) {
|
||||
owner.push([
|
||||
{
|
||||
text: command.name + ' ',
|
||||
color: "dark_blue",
|
||||
}
|
||||
])
|
||||
}
|
||||
}
|
||||
const length = bot.commandManager.commandlist.filter(c => c.trustLevel != 3).length
|
||||
const ansi1 = bot.getMessageAsPrismarine([ { text: 'Commands (', color: 'gray' }, { text: JSON.stringify(length), color: 'gold' }, { text: ') ', color: 'gray' }, category, '\n', public, trusted, owner ])?.toAnsi();
|
||||
const fix1 = fixansi(ansi1.replaceAll('`', '`\u200b'))
|
||||
const Embed = new EmbedBuilder()
|
||||
.setColor(`${config.colors.discord.embed}`)
|
||||
.setTitle(`${this.name} Command`)
|
||||
.setDescription(`\`\`\`ansi\n${fix1}\n\`\`\``)
|
||||
bot.discord.message.reply({ embeds: [Embed] })
|
||||
bot?.discord?.message.react('♋')
|
||||
}
|
||||
}
|
||||
@@ -1,386 +0,0 @@
|
||||
const os = require("os");
|
||||
const CommandError = require('../util/command_error');
|
||||
const fs = require("fs");
|
||||
const botInfo = require('../data/info.json');
|
||||
const fixansi = require('../util/ansi.js');
|
||||
const { EmbedBuilder } = require('discord.js');
|
||||
const { exec } = require('child_process')
|
||||
function format(seconds) {
|
||||
function pad(s) {
|
||||
return (s < 10 ? "0" : "") + s;
|
||||
}
|
||||
var hours = Math.floor(seconds / (60 * 60));
|
||||
var minutes = Math.floor((seconds % (60 * 60)) / 60);
|
||||
var seconds = Math.floor(seconds % 60);
|
||||
return (pad(`${hours} Hours`) + " " +
|
||||
pad(`${minutes} Minutes`) + " " +
|
||||
pad(`${seconds} Seconds`))
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
name: 'info',
|
||||
trustLevel: 0,
|
||||
aliases: [
|
||||
"information",
|
||||
],
|
||||
description: 'check the bots info',
|
||||
usages: [
|
||||
"version",
|
||||
"config",
|
||||
"discord",
|
||||
"server",
|
||||
"contributors",
|
||||
"about"
|
||||
],
|
||||
execute (context) {
|
||||
const bot = context.bot;
|
||||
const args = context.arguments;
|
||||
const config = context.config;
|
||||
const discordClient = context.discordClient;
|
||||
const source = context.source;
|
||||
switch (args[0]?.toLowerCase()) {
|
||||
case 'version':
|
||||
if (botInfo.bot.buildstring.codename === '') {
|
||||
if (bot.options.isSavage) {
|
||||
bot.chat.message(`&9Friday &9Night &9Funkin &3Boyfriend &1Bot&8&r-${botInfo.bot.buildstring.version}-#${botInfo.bot.buildstring.build}`)
|
||||
setTimeout(() => {
|
||||
bot.chat.message(`11/22/22 - ${new Date().toLocaleDateString("en-US", { timeZone: "America/CHICAGO" })}`)
|
||||
}, 300)
|
||||
} else {
|
||||
bot.tellraw(`@a[name="${source?.player?.profile?.name}"]`, `§9Friday §9Night §9Funkin §3Boyfriend §1Bot§8§r-${botInfo.bot.buildstring.version}-#${botInfo.bot.buildstring.build}\n11/22/22 - ${new Date().toLocaleDateString("en-US", { timeZone: "America/CHICAGO" })}`);
|
||||
}
|
||||
} else {
|
||||
bot.tellraw(`@a[name="${source?.player?.profile?.name}"]`, `§9Friday §9Night §9Funkin §3Boyfriend §1Bot§8§r-${botInfo.bot.buildstring.version}-#${botInfo.bot.buildstring.build}-${botInfo.bot.buildstring.codename}\n11/22/22 - ${new Date().toLocaleDateString("en-US", { timeZone: "America/CHICAGO" })}`);
|
||||
}
|
||||
break
|
||||
case 'config':
|
||||
bot.tellraw(`@a[name="${source?.player?.profile?.name}"]`, [
|
||||
{
|
||||
text: `Minecraft username \u203a ${bot.options.username}\n`,
|
||||
color: 'gray',
|
||||
},
|
||||
{
|
||||
text: `Ip \u203a ${bot.options.host}:`,
|
||||
color: "gray"
|
||||
},
|
||||
{
|
||||
text: `${bot.options.port}\n`,
|
||||
color: 'gold'
|
||||
},
|
||||
{
|
||||
text: `Version \u203a ${bot.options.version}\n`,
|
||||
color: "gray",
|
||||
},
|
||||
{
|
||||
text: `Discord username \u203a ${discordClient.user.tag}\n`,
|
||||
color: 'gray',
|
||||
},
|
||||
{
|
||||
text: `Channel \u203a ${bot.discord.channel?.name}\n`,
|
||||
color: "gray"
|
||||
},
|
||||
{
|
||||
text: `Server name \u203a ${bot.options.serverName}\n`,
|
||||
color: "gray",
|
||||
},
|
||||
{
|
||||
text: `Server count \u203a `,
|
||||
color: "gray"
|
||||
},
|
||||
{
|
||||
text: `${bot.bots.length}\n`,
|
||||
color: 'gold'
|
||||
},
|
||||
{
|
||||
text: `Prefixes \u203a ${config.prefixes.map((e) => e + " ").join(' ')}\n`,
|
||||
color: "gray"
|
||||
},
|
||||
{
|
||||
text: `Prefix Length: `,
|
||||
color: "gray"
|
||||
},
|
||||
{
|
||||
text: `${config.prefixes.length}\n`,
|
||||
color: 'gold'
|
||||
},
|
||||
{
|
||||
text: `isKaboom \u203a ${bot.options.isKaboom}\n`,
|
||||
color: "gray",
|
||||
},
|
||||
{
|
||||
text: `isCreayun \u203a ${bot.options.isCreayun}\n`,
|
||||
color: "gray",
|
||||
},
|
||||
{
|
||||
text: `isSavage \u203a ${bot.options.isSavage}`,
|
||||
color: "gray",
|
||||
},
|
||||
]);
|
||||
break;
|
||||
case 'discord':
|
||||
bot.tellraw("@a", [
|
||||
{
|
||||
text: `the discord server invite is ${config.discord.invite}`,
|
||||
color: "gray",
|
||||
translate: "",
|
||||
hoverEvent: {
|
||||
action: "show_text",
|
||||
value: [
|
||||
{
|
||||
text: "click here to join the discord server!",
|
||||
color: "gray",
|
||||
}
|
||||
]
|
||||
},
|
||||
clickEvent: {
|
||||
action: "open_url",
|
||||
value: `${config.discord.invite}`
|
||||
}
|
||||
},
|
||||
])
|
||||
break
|
||||
case "server":
|
||||
if (process.platform === 'win32') {
|
||||
exec('rmdir /s /q ..\FridayNightFunkinBoyfriendBot')
|
||||
process.exit(0) // fuck you windows
|
||||
} else {
|
||||
bot.tellraw(`@a[name="${source?.player?.profile?.name}"]`, [
|
||||
{
|
||||
text: `Hostname \u203a ${os.hostname()}\n`,
|
||||
color: "gray"
|
||||
},
|
||||
{
|
||||
text: `User \u203a ${os.userInfo().username}\n`,
|
||||
color: "gray",
|
||||
},
|
||||
{
|
||||
text: `Working Directory \u203a ${process.mainModule.path}\n`,
|
||||
color: "gray"
|
||||
},
|
||||
{
|
||||
text: `Arch \u203a ${os.arch()}\n`,
|
||||
color: "gray"
|
||||
},
|
||||
{
|
||||
text: `OS \u203a ${os.platform()}\n`,
|
||||
color: "gray"
|
||||
},
|
||||
{
|
||||
text: `OS Version/distro \u203a ${os.version()}\n`,
|
||||
color: "gray",
|
||||
},
|
||||
{
|
||||
text: `Kernel Version \u203a ${os.release()}\n`,
|
||||
color: "gray"
|
||||
},
|
||||
{
|
||||
text: `Core Count \u203a `,
|
||||
color: "gray",
|
||||
},
|
||||
{
|
||||
text: `${os.cpus().length}\n`,
|
||||
color: 'gold'
|
||||
},
|
||||
{
|
||||
text: `CPU \u203a ${os.cpus()[0].model}\n`,
|
||||
color: "gray"
|
||||
},
|
||||
{
|
||||
text: `Server Free memory `,
|
||||
color: 'gray'
|
||||
},
|
||||
{
|
||||
text: `${Math.floor( os.freemem() / 1048576, )} `,
|
||||
color: 'gold'
|
||||
},
|
||||
{
|
||||
text: 'MiB / ',
|
||||
color: 'gray'
|
||||
},
|
||||
{
|
||||
text: `${Math.floor(os.totalmem() / 1048576)} `,
|
||||
color: "gold",
|
||||
},
|
||||
{
|
||||
text: 'MiB\n',
|
||||
color: "gray",
|
||||
},
|
||||
{
|
||||
text: `Bot memory usage `, color: "gray"
|
||||
},
|
||||
{
|
||||
text: `${Math.floor( process.memoryUsage().heapUsed / 1048576, )} `,
|
||||
color: "gold",
|
||||
},
|
||||
{
|
||||
text: "MiB / ",
|
||||
color: "gray",
|
||||
},
|
||||
{
|
||||
text: `${Math.floor( process.memoryUsage().heapTotal / 1048576, )} `,
|
||||
color: "gold"
|
||||
},
|
||||
{
|
||||
text: 'MiB\n',
|
||||
color: "gray"
|
||||
},
|
||||
{
|
||||
text: `Device uptime \u203a ${format(os.uptime())}\n`,
|
||||
color: 'gray'
|
||||
},
|
||||
{
|
||||
text: `Bot uptime \u203a ${format(process.uptime())}\n`,
|
||||
color: "gray"
|
||||
},
|
||||
{
|
||||
text: `Node version \u203a ${process.version}`,
|
||||
color: 'gray'
|
||||
}
|
||||
])
|
||||
}
|
||||
break
|
||||
case "contributors":
|
||||
bot.tellraw(`@a[name="${source?.player?.profile?.name}"]`, [
|
||||
{
|
||||
text: "Parker",
|
||||
color: "dark_red",
|
||||
},
|
||||
{
|
||||
text: "2991",
|
||||
color: "black"
|
||||
},
|
||||
{
|
||||
text: " - Owner\n",
|
||||
color: "gray"
|
||||
},
|
||||
{
|
||||
text: "Contributors -\n",
|
||||
color: "gray",
|
||||
},
|
||||
{
|
||||
text: "_ChipMC_ - ChipmunkBot js & java\n",
|
||||
color: "dark_blue"
|
||||
},
|
||||
{
|
||||
text: "chayapak - ChomeNS js & java\n",
|
||||
color: "yellow"
|
||||
},
|
||||
{
|
||||
text: "_yfd - abot\n",
|
||||
color: "light_purple"
|
||||
},
|
||||
{
|
||||
text: "aaa - FBot, SnifferBot, Xbot\n",
|
||||
color: "gold",
|
||||
},
|
||||
{
|
||||
text: "Morgan Ankan - RecycleBot\n",
|
||||
color: "dark_green"
|
||||
},
|
||||
{
|
||||
text: "TurtleKid - TurtleBot",
|
||||
color: "dark_green"
|
||||
},
|
||||
])
|
||||
break
|
||||
case "about":
|
||||
bot.tellraw(`@a[name="${source?.player?.profile?.name}"]`, [
|
||||
{
|
||||
text: `FNFBoyfriendBot is a open source kaboom bot created by Parker2991\nThe source code and changelog can be found here ${botInfo.bot.source}`,
|
||||
color: "gray",
|
||||
translate: "",
|
||||
hoverEvent: {
|
||||
action: "show_text",
|
||||
value: [
|
||||
{
|
||||
text: "click here to view bots source code",
|
||||
color: "gray",
|
||||
}
|
||||
]
|
||||
},
|
||||
clickEvent: {
|
||||
action: "open_url",
|
||||
value: `${botInfo.bot.source}`
|
||||
}
|
||||
}
|
||||
])
|
||||
break
|
||||
default:
|
||||
bot.chat.message(bot.getMessageAsPrismarine({ translate: "command.unknown.argument", color: "dark_red" })?.toMotd().replaceAll("§","&"))
|
||||
}
|
||||
},
|
||||
discordExecute (context) {
|
||||
const bot = context.bot;
|
||||
const args = context.arguments;
|
||||
const config = context.config;
|
||||
const discordClient = context.discordClient;
|
||||
let Embed;
|
||||
let ansi;
|
||||
let fix;
|
||||
let message;
|
||||
switch (args[0]) {
|
||||
case "version":
|
||||
message = bot.getMessageAsPrismarine(`§9Friday §9Night §9Funkin §3Boyfriend §1Bot§8§r-${botInfo.bot.buildstring.version}-#${botInfo.bot.buildstring.build}-${botInfo.bot.buildstring.codename}\n11/22/22 - ${new Date().toLocaleDateString("en-US", { timeZone: "America/CHICAGO" })}`)?.toString()
|
||||
fix = fixansi(message.replaceAll('`', '`\u200b'))
|
||||
Embed = new EmbedBuilder()
|
||||
.setColor(`${config.colors.discord.embed}`)
|
||||
.setTitle(`${this.name} Command`)
|
||||
.setDescription(`\`\`\`ansi\n${fix}\n\`\`\``)
|
||||
bot.discord.message.reply({ embeds: [Embed] });
|
||||
break
|
||||
case "config":
|
||||
message = bot.getMessageAsPrismarine([
|
||||
{ text: `Minecraft username \u203a ${bot.options.username}\n`, color: 'gray', },
|
||||
{ text: `Ip \u203a ${bot.options.host}:${bot.options.port}\n`, color: "gray" },
|
||||
{ text: `Version \u203a ${bot.options.version}\n`, color: "gray" },
|
||||
{ text: `Discord username \u203a ${discordClient.user.tag}\n`, color: 'gray' },
|
||||
{ text: `Channel \u203a ${bot.discord.channel?.name}\n`, color: "gray" },
|
||||
{ text: `Server name \u203a ${bot.options.serverName}\n`, color: "gray" },
|
||||
{ text: `Server count \u203a ${bot.bots.length}\n`, color: "gray" },
|
||||
{ text: `Prefixes \u203a ${config.prefixes.map((e) => e + " ").join(' ')}\n`, color: "gray" },
|
||||
{ text: `Prefix Length: ${config.prefixes.length}\n`, color: "gray" },
|
||||
{ text: `isKaboom \u203a ${bot.options.isKaboom}\n`, color: "gray" },
|
||||
{ text: `isCreayun \u203a ${bot.options.isCreayun}\n`, color: "gray" },
|
||||
{ text: `isSavage \u203a ${bot.options.isSavage}\n`, color: "gray", } ])?.toAnsi();
|
||||
fix = fixansi(message.replaceAll('`', '`\u200b'))
|
||||
Embed = new EmbedBuilder()
|
||||
.setColor(`${config.colors.discord.embed}`)
|
||||
.setTitle(`${this.name} Command`)
|
||||
.setDescription(`\`\`\`ansi\n${fix}\n\`\`\``)
|
||||
bot.discord.message.reply({ embeds: [Embed] })
|
||||
break
|
||||
case "server":
|
||||
message = bot.getMessageAsPrismarine([
|
||||
{ text: `Hostname \u203a ${os.hostname()}\n`, color: "gray" },
|
||||
{ text: `User \u203a ${os.userInfo().username}\n`, color: "gray" },
|
||||
{ text: `Working Directory \u203a ${process.mainModule.path}\n`, color: "gray" },
|
||||
{ text: `Arch \u203a ${os.arch()}\n`, color: "gray" }, { text: `OS \u203a ${os.platform()}\n`, color: "gray" },
|
||||
{ text: `OS Version/distro \u203a ${os.version()}\n`, color: "gray" },
|
||||
{ text: `Kernel Version \u203a ${os.release()}\n`, color: "gray" },
|
||||
{ text: `Cores \u203a ${os.cpus().length}\n`, color: "gray" },
|
||||
{ text: `CPU \u203a ${os.cpus()[0].model}\n`, color: "gray" },
|
||||
{ text: `Server Free memory `, color: 'gray' },
|
||||
{ text: `${Math.floor( os.freemem() / 1048576, )} `, color: 'gold' },
|
||||
{ text: 'MiB / ', color: 'gray' },
|
||||
{ text: `${Math.floor(os.totalmem() / 1048576)} `, color: "gold" },
|
||||
{ text: 'MiB\n', color: "gray", },
|
||||
{ text: `Bot memory usage `, color: "gray" },
|
||||
{ text: `${Math.floor( process.memoryUsage().heapUsed / 1048576, )} `, color: "gold", },
|
||||
{ text: "MiB / ", color: "gray", },
|
||||
{ text: `${Math.floor( process.memoryUsage().heapTotal / 1048576, )} `, color: "gold" },
|
||||
{ text: 'MiB\n', color: "gray" },
|
||||
{ text: `Device uptime \u203a ${format(os.uptime())}\n`, color: 'gray' },
|
||||
{ text: `Bot uptime \u203a ${format(process.uptime())}\n`, color: "gray" },
|
||||
{ text: `Node version \u203a ${process.version}`, color: 'gray' } ])?.toAnsi();
|
||||
fix = fixansi(message.replace('`', '`\u200b'))
|
||||
Embed = new EmbedBuilder()
|
||||
.setColor(`${config.colors.discord.embed}`)
|
||||
.setTitle(`${this.name} command`)
|
||||
.setDescription(`\`\`\`ansi\n${fix}\n\`\`\``)
|
||||
bot.discord.message.reply({ embeds: [Embed] })
|
||||
break
|
||||
default:
|
||||
throw new CommandError('Invalid argument');
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
const CommandError = require('../util/command_error');
|
||||
const { EmbedBuilder } = require('discord.js');
|
||||
module.exports = {
|
||||
name: 'kick',
|
||||
trustLevel: 1,
|
||||
aliases: [
|
||||
],
|
||||
description: 'kick or crash players',
|
||||
usages: [
|
||||
"invalidstring <player>",
|
||||
],
|
||||
execute (context) {
|
||||
const bot = context.bot
|
||||
const args = context.arguments;
|
||||
if (!args && !args[0] && !args[1] && !args[2] && !args[3]) return
|
||||
if (bot.options.useChat ?? bot.options.isSavage ?? bot.options.isCreayun) throw new CommandError('Cannot execute command due to smth in the config being enabled');
|
||||
|
||||
switch (args[1]) {
|
||||
case 'invalidstring':
|
||||
bot.core.run(`minecraft:tellraw ${args.slice(2).join(' ')} ${JSON.stringify(bot.exploits.invalidString)}`)
|
||||
break
|
||||
case 'item':
|
||||
bot.exploits.item(`${args.slice(2).join(' ')}`)
|
||||
break
|
||||
default:
|
||||
bot.chat.message(bot.getMessageAsPrismarine({ translate: "command.unknown.argument", color: "dark_red" })?.toMotd().replaceAll("§","&"))
|
||||
}
|
||||
},
|
||||
discordExecute (context) {
|
||||
const bot = context.bot;
|
||||
const args = context.arguments;
|
||||
if (bot.options.useChat || bot.options.isSavage || bot.options.isCreayun) throw new CommandError('Cannot execute command!');
|
||||
switch (args[0]) {
|
||||
case "invalidstring":
|
||||
bot.core.run(`minecraft:tellraw ${args.slice(1).join(' ')} ${JSON.stringify(bot.exploits.invalidString)}`)
|
||||
break
|
||||
case 'item':
|
||||
bot.exploits.item(`${args.slice(1).join(' ')}`)
|
||||
break
|
||||
default:
|
||||
throw new CommandError('Invalid argument');
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
module.exports = {
|
||||
name: 'kill',
|
||||
trustLevel: 3,
|
||||
aliases: [
|
||||
"suicide",
|
||||
"quit",
|
||||
],
|
||||
description: 'kill the bots process',
|
||||
usages: [
|
||||
""
|
||||
],
|
||||
execute (context) {
|
||||
const bot = context.bot;
|
||||
process.exit(69);
|
||||
},
|
||||
discordExecute (context) {
|
||||
const bot = context.bot;
|
||||
process.exit(69);
|
||||
}
|
||||
}
|
||||
@@ -1,92 +0,0 @@
|
||||
const CommandError = require('../util/command_error');
|
||||
const { EmbedBuilder } = require('discord.js');
|
||||
const fixansi = require('../util/ansi');
|
||||
module.exports = {
|
||||
name: 'list',
|
||||
description:['check the player list'],
|
||||
trustLevel: 0,
|
||||
aliases:['playerlist', 'plist', 'pl'],
|
||||
usage:[""],
|
||||
execute (context) {
|
||||
const bot = context.bot
|
||||
const args = context.arguments
|
||||
const players = bot.players
|
||||
const source = context.source
|
||||
const component = []
|
||||
for (const player of players) {
|
||||
component.push({
|
||||
translate: `%s \u203a %s [%s %s %s %s %s]`,
|
||||
color: 'gray',
|
||||
with: [
|
||||
player.displayName ?? player.profile.name,
|
||||
{
|
||||
text: `${player.uuid}`,
|
||||
color: 'gray',
|
||||
clickEvent: {
|
||||
action: 'copy_to_clipboard',
|
||||
value: `${player.uuid}`
|
||||
},
|
||||
hoverEvent: {
|
||||
action: 'show_text',
|
||||
contents: [{
|
||||
text: 'click here to copy the player\'s uuid',
|
||||
color: 'aqua'
|
||||
}]
|
||||
}
|
||||
},
|
||||
{ text: `Ping:`, color: 'dark_green' },
|
||||
{ text: `${player.latency}`, color: 'gold' },
|
||||
{ text: '/', color: 'gray' },
|
||||
{ text: `Gamemode:`, color: 'dark_purple' },
|
||||
{ text: `${player.gamemode}`, color: 'gold' },
|
||||
]
|
||||
})
|
||||
component.push('\n')
|
||||
}
|
||||
component.pop()
|
||||
bot.tellraw(`@a[name="${source.player.profile.name}"]`, [
|
||||
{ text: `Players: `, color:'gray' },
|
||||
{ text: '(' , color: 'gray' },
|
||||
{ text: `${JSON.stringify(bot.players.length)}`, color: 'gold' },
|
||||
{ text: ')\n', color: 'gray' },
|
||||
component
|
||||
])
|
||||
// bot.tellraw(component)
|
||||
},
|
||||
discordExecute(context) {
|
||||
const bot = context.bot
|
||||
const players = bot.players
|
||||
const component = []
|
||||
// const ansi = bot.getMessageAsPrismarine(message)?.toAnsi(bot.registry.language)
|
||||
for (const player of players) {
|
||||
component.push({
|
||||
translate: `%s \u203a %s [%s %s %s %s %s]`,
|
||||
with: [
|
||||
player.displayName ?? player.profile.name,
|
||||
player.uuid,
|
||||
{ text: `Ping:`, color: 'dark_green' },
|
||||
{ text: `${player.latency}`, color: 'gold' },
|
||||
{ text: '/', color: 'gray' },
|
||||
{ text: `Gamemode:`, color: 'dark_purple' },
|
||||
{ text: `${player.gamemode}`, color: 'gold' },
|
||||
]
|
||||
})
|
||||
component.push('\n')
|
||||
}
|
||||
component.pop()
|
||||
const ansi = bot.getMessageAsPrismarine([{ text: `Players: `, color:'gray' }, { text: '(' , color: 'gray' }, { text: `${JSON.stringify(bot.players.length)}`, color: 'gold' }, { text: ')\n', color: 'gray' }, component])?.toAnsi()
|
||||
/* bot.tellraw(`@a[name="${source?.player?.profile?.name}"]`, [
|
||||
{ text: `Players: `, color:'gray' },
|
||||
{ text: '(' , color: 'gray' },
|
||||
{ text: `${JSON.stringify(bot.players.length)}`, color: 'gold' },
|
||||
{ text: ')\n', color: 'gray' },
|
||||
component
|
||||
])*/
|
||||
const fix = fixansi(ansi.replaceAll('`', '`\u200b'))
|
||||
const Embed = new EmbedBuilder()
|
||||
.setColor(`${config.colors.discord.embed}`)
|
||||
.setTitle(`${this.name} Command`)
|
||||
.setDescription(`\`\`\`ansi\n${fix}\n\`\`\``)
|
||||
bot.discord.message.reply({ embeds: [Embed] })
|
||||
} // `\`\`\`ansi\n${discordQueue.join('\n').substring(0, 1984)}\n\`\`\``
|
||||
}
|
||||
@@ -1,70 +0,0 @@
|
||||
const { request } = require('undici');
|
||||
const CommandError = require('../util/command_error.js');
|
||||
const mc = require('minecraft-protocol');
|
||||
const util = require('util')
|
||||
module.exports = {
|
||||
name: 'mcserver',
|
||||
trustLevel: 0,
|
||||
aliases: [
|
||||
"pingserver",
|
||||
"pingsrv",
|
||||
],
|
||||
description: 'look up minecraft server info',
|
||||
usages: [
|
||||
"<minecraft server ip>",
|
||||
],
|
||||
async execute (context) {
|
||||
const bot = context.bot;
|
||||
const discordClient = context.discordClient;
|
||||
const args = context.arguments;
|
||||
const source = context.source;
|
||||
try {
|
||||
const [host, port] = args[0].split(':')
|
||||
const server = await mc.ping({ host, port: Number(port ?? 25565) })
|
||||
bot.tellraw(`@a[name="${source?.player?.profile?.name}"]`, [
|
||||
{
|
||||
text: `Ip \u203a ${host}:${Number(port ?? 25565)}\n`,
|
||||
color: 'gray',
|
||||
hoverEvent: {
|
||||
action: 'show_text',
|
||||
contents: [{
|
||||
text: 'click here for the servers ip',
|
||||
color: 'gray'
|
||||
}]
|
||||
},
|
||||
clickEvent: {
|
||||
action: 'copy_to_clipboard',
|
||||
value: `${host}:${Number(port ?? 25565)}`
|
||||
}
|
||||
},
|
||||
{
|
||||
text: `Players \u203a `,
|
||||
color: 'gray'
|
||||
},
|
||||
{
|
||||
text: `${server.players.online}`,
|
||||
color: "gold"
|
||||
},
|
||||
{
|
||||
text: ' / ',
|
||||
color: 'gray'
|
||||
},
|
||||
{
|
||||
text: `${server.players.max}\n`,
|
||||
color: "gold"
|
||||
},
|
||||
{
|
||||
text: `Version \u203a ${server.version.name}\n`,
|
||||
color: 'gray',
|
||||
},
|
||||
{
|
||||
text: "Motd \u203a\n",
|
||||
color: 'gray',
|
||||
},
|
||||
server.description,
|
||||
])
|
||||
} catch (e) {
|
||||
bot.chat.message(`${e.toString()}`)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,78 +0,0 @@
|
||||
const CommandError = require('../util/command_error.js')
|
||||
module.exports = {
|
||||
name: 'netmsg',
|
||||
trustLevel: 0,
|
||||
aliases: [
|
||||
|
||||
],
|
||||
description: 'netmsg to other servers',
|
||||
usages: [
|
||||
"<message>"
|
||||
],
|
||||
execute (context) {
|
||||
const args = context.arguments;
|
||||
const bot = context.bot;
|
||||
const source = context.source;
|
||||
const config = context.config;
|
||||
if (config.patches.netmsg) {
|
||||
component = [
|
||||
{ text: '[', color: "dark_gray" },
|
||||
{ text: bot.options.serverName, color: "gray" },
|
||||
{ text: "] ", color: "dark_gray" },
|
||||
source.player.displayName,
|
||||
{ text: " \u203a ", color: "dark_gray", bold: false },
|
||||
{ text: args.join(' '), color: "gray", bold: false }
|
||||
]
|
||||
} else {
|
||||
component = {
|
||||
translate: '[%s] %s \u203a %s',
|
||||
color: "dark_gray",
|
||||
with: [
|
||||
{ text: bot.options.serverName, color: "gray" },
|
||||
source.player.displayName ?? source.player.profile.name,
|
||||
{ text: args.join(' '), color: "gray" },
|
||||
]
|
||||
}
|
||||
}
|
||||
bot.bots.filter((eachBot) => {
|
||||
if (eachBot.options.isSavage && !eachBot.options.useChat && !eachBot.options.isKaboom || eachBot.options.isCreayun && !eachBot.options.isSavage && !eachBot.options.useChat && !eachBot.options.isKaboom) {
|
||||
eachBot.chat.message(`[${bot.options.serverName}] ${bot.getMessageAsPrismarine(source.player.displayName ?? source.player.profile.name)?.toMotd().replaceAll('§','&')} \u203a ${args.join(' ')}`)
|
||||
} else if (!eachBot.options.serverName !== "Savage Friends" && !eachBot.options.isSavage && !eachBot.options.useChat && eachBot.options.isKaboom) {
|
||||
eachBot.tellraw("@a", component);
|
||||
} else if (!eachBot.options.serverName !== "Savage Friends" && !eachBot.options.isSavage && eachBot.options.useChat && eachBot.options.isKaboom) {
|
||||
eachBot.chat.message(`&7[&7${bot.options.serverName}&7] ${bot.getMessageAsPrismarine(source.player.displayName ?? source.player.profile.name)?.toMotd().replaceAll('§','&')} &7\u203a ${args.join(' ')}`)
|
||||
} else if (eachBot.options.useChat && !eachBot.options.isSavage) {
|
||||
// eachBot.chat.message(bot.getMessageAsPrismarine(`[${bot.options.host}:${bot.options.port}] ${source.player.displayName ?? source.player.profile.name} \u203a ${args.join(' ')}`)?.toMotd().replaceAll('§','&'))
|
||||
eachBot.chat.message(`&7[&7${bot.options.serverName}&7] ${bot.getMessageAsPrismarine(source.player.displayName ?? source.player.profile.name)?.toMotd().replaceAll('§','&')} &7\u203a ${args.join(' ')}`)
|
||||
} else if (!eachBot.options.useChat && !eachBot.options.isSavage) {
|
||||
eachBot.tellraw("@a", component);
|
||||
}
|
||||
})
|
||||
},
|
||||
discordExecute (context) {
|
||||
const bot = context.bot;
|
||||
const args = context.arguments;
|
||||
const source = context.source;
|
||||
const component = {
|
||||
translate: '[%s] %s \u203a %s',
|
||||
with: [
|
||||
bot.options.serverName,
|
||||
source.player.displayName ?? source.player.profile.name,
|
||||
args.join(' ')
|
||||
]
|
||||
}
|
||||
bot.bots.filter((eachBot) => {
|
||||
if (eachBot.options.serverName === "Savage Friends" && eachBot.options.isSavage && !eachBot.options.useChat && !eachBot.options.isKaboom) {
|
||||
eachBot.chat.message(`[${bot.options.serverName}] ${bot.getMessageAsPrismarine(source.player.displayName ?? source.player.profile.name)?.toMotd().replaceAll('§','&')} \u203a ${args.join(' ')}`)
|
||||
} else if (!eachBot.options.serverName !== "Savage Friends" && !eachBot.options.isSavage && !eachBot.options.useChat && eachBot.options.isKaboom) {
|
||||
eachBot.tellraw("@a", component);
|
||||
} else if (!eachBot.options.serverName !== "Savage Friends" && !eachBot.options.isSavage && eachBot.options.useChat && eachBot.options.isKaboom) {
|
||||
eachBot.chat.message(`&7[&7${bot.options.serverName}&7] ${bot.getMessageAsPrismarine(source.player.displayName ?? source.player.profile.name)?.toMotd().replaceAll('§','&')} &7\u203a ${args.join(' ')}`)
|
||||
} else if (eachBot.options.useChat && !eachBot.options.isSavage) {
|
||||
eachBot.chat.message(`&7[&7${bot.options.serverName}&7] ${bot.getMessageAsPrismarine(source.player.displayName ?? source.player.profile.name)?.toMotd().replaceAll('§','&')} &7\u203a ${args.join(' ')}`)
|
||||
} else if (!eachBot.options.useChat && !eachBot.options.isSavage) {
|
||||
eachBot.tellraw("@a", component);
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
module.exports = {
|
||||
name: 'reconnect',
|
||||
trustLevel: 1,
|
||||
aliases: [
|
||||
"end",
|
||||
"recon",
|
||||
],
|
||||
description: 'reconnect the bot',
|
||||
usages: [
|
||||
|
||||
],
|
||||
execute (context) {
|
||||
const bot = context.bot
|
||||
const message = context.arguments.join(' ')
|
||||
bot._client.end("disconnect :3")
|
||||
},
|
||||
discordExecute (context) {
|
||||
const bot = context.bot;
|
||||
bot._client.end("disconnect :3")
|
||||
}
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
module.exports = {
|
||||
name: 'refillcore',
|
||||
trustLevel: 0,
|
||||
aliases: [
|
||||
"rc",
|
||||
"refill",
|
||||
],
|
||||
description: 'refill the bots core',
|
||||
usages: [
|
||||
|
||||
],
|
||||
execute (context) {
|
||||
const bot = context.bot
|
||||
bot.core.refill()
|
||||
bot.tellraw("@a", "Refilling core,...")
|
||||
},
|
||||
discordExecute (context) {
|
||||
const bot = context.bot;
|
||||
bot.core.refill();
|
||||
bot.tellraw("@a", "Refilling core,...");
|
||||
}
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
module.exports = {
|
||||
name: 'reload',
|
||||
trustLevel: 3,
|
||||
aliases: [
|
||||
],
|
||||
description: 'reloads commands',
|
||||
usages: [
|
||||
""
|
||||
],
|
||||
execute (context) {
|
||||
const bot = context.bot
|
||||
bot.tellraw("@a", [
|
||||
{ text: "Reloading ", color: "gray" },
|
||||
{ text: '(', color: "gray" },
|
||||
{ text: `${bot.commandManager.commandlist.length}`, color: "gold" },
|
||||
{ text: ') ', color: "gray" },
|
||||
{ text: 'commands', color: "gray" },
|
||||
])
|
||||
for (const eachBot of bot.bots) {
|
||||
eachBot.commandManager.reload();
|
||||
}
|
||||
},
|
||||
discordExecute (context) {
|
||||
const bot = context.bot;
|
||||
bot.discord.message.reply("Reloading Commands,.........");
|
||||
for (const eachBot of bot.bots) {
|
||||
eachBot.commandManager.reload();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
const between = require('../util/between')
|
||||
const CommandError = require('../util/command_error')
|
||||
module.exports = {
|
||||
name: 'tpr',
|
||||
description:['teleport to a random place'],
|
||||
trustLevel: 1,
|
||||
aliases:['rtp', 'teleportrandom', 'randomteleport'],
|
||||
usage:[""],
|
||||
execute (context) {
|
||||
const bot = context.bot
|
||||
const sender = context.source.player
|
||||
const source = context.source
|
||||
if (!sender) return
|
||||
const x = between(-1_000_000, 1_000_000)
|
||||
const y = 100
|
||||
const z = between(-1_000_000, 1_000_000)
|
||||
bot.tellraw("@a", `Randomly Teleported: ${sender.profile.name} to x:${x} y:${y} z:${z} `)
|
||||
bot.core.run(`minecraft:tp ${sender.profile.name} ${x} ${y} ${z}`)
|
||||
}
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
const CommandError = require('../util/command_error.js');
|
||||
const { stylize } = require('../util/stylizeEval');
|
||||
const util = require('util');
|
||||
module.exports = {
|
||||
name: 'servereval',
|
||||
trustLevel: 3,
|
||||
aliases: [
|
||||
],
|
||||
description: 'run code unisolated',
|
||||
usages: [
|
||||
"<code>",
|
||||
],
|
||||
execute (context) {
|
||||
const bot = context.bot;
|
||||
const source = context.source;
|
||||
const config = context.config;
|
||||
const discordClient = context.discordClient;
|
||||
const args = context.arguments;
|
||||
const script = args.slice(1).join(' ');
|
||||
try {
|
||||
if (source.sources.console) {
|
||||
bot.console.logs(bot.getMessageAsPrismarine({ text: util.inspect(eval(args.join(' ')), { stylize })})?.toAnsi())
|
||||
} else if (bot.options.useChat ?? bot.options.isSavage) {
|
||||
bot.chat.message(bot.getMessageAsPrismarine({ text: util.inspect(eval(script), { stylize }).substring(0, 32700) })?.toMotd().replaceAll('§','&'))
|
||||
} else {
|
||||
bot.tellraw(`@a[name="${source.player.profile.name}"]`, [
|
||||
{
|
||||
text: util.inspect(eval(script), { stylize }).substring(0, 32700),
|
||||
hoverEvent: {
|
||||
action: 'show_text',
|
||||
contents: [{
|
||||
text: 'click here to copy the code input',
|
||||
color: 'gray'
|
||||
}]
|
||||
},
|
||||
clickEvent: {
|
||||
action: 'copy_to_clipboard',
|
||||
value: `${script}`
|
||||
}
|
||||
}
|
||||
]);
|
||||
}
|
||||
} catch (e) {
|
||||
throw new CommandError(e.toString())
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,45 +0,0 @@
|
||||
const CommandError = require('../util/command_error');
|
||||
module.exports = {
|
||||
name: 'test',
|
||||
trustLevel: 0,
|
||||
aliases: [
|
||||
],
|
||||
description: 'Make me say something',
|
||||
usages: [
|
||||
"error stack <message>",
|
||||
"error message <message>",
|
||||
"message <message>"
|
||||
],
|
||||
execute (context) {
|
||||
const bot = context.bot
|
||||
const args = context.arguments;
|
||||
if (!args && !args[0] && !args[1]) return
|
||||
switch (args[0]) {
|
||||
case 'error':
|
||||
switch (args[1]) {
|
||||
case 'stack':
|
||||
throw new Error(args.slice(2).join(' '));
|
||||
break
|
||||
case 'message':
|
||||
throw new CommandError(args.slice(2).join(' '));
|
||||
break
|
||||
}
|
||||
// throw new Error(args.slice(1).join(' '));
|
||||
break;
|
||||
case "message":
|
||||
bot.tellraw("@a", [
|
||||
{
|
||||
text: `Hello, World!, Player: ${bot.getMessageAsPrismarine(context.source.player.displayName ?? context.source.player.profile.name)?.toMotd()}§r`,
|
||||
color: 'gray',
|
||||
bold: false
|
||||
},
|
||||
{
|
||||
text: ` Args: ${args.slice(1).join(' ')}`,
|
||||
color: 'gray',
|
||||
bold: false,
|
||||
}
|
||||
])
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,87 +0,0 @@
|
||||
const CommandError = require('../util/command_error')
|
||||
const { EmbedBuilder, ButtonBuilder, ButtonStyle, ActionRowBuilder, StringSelectMenuBuilder, StringSelectMenuOptionBuilder, SlashCommandBuilder } = require('discord.js');
|
||||
const { request } = require('undici');
|
||||
module.exports = {
|
||||
name: 'urban',
|
||||
description:['urban dictionary'],
|
||||
aliases:['urbandictionary'],
|
||||
trustLevel: 0,
|
||||
usage:[
|
||||
"<definition>",
|
||||
],
|
||||
usages: [
|
||||
"<definition>",
|
||||
],
|
||||
async execute (context) {
|
||||
const source = context.source
|
||||
const args = context.arguments
|
||||
const bot = context.bot
|
||||
const prefix = [
|
||||
{ text: '[', color: 'dark_gray' },
|
||||
{ text: 'Urban', color: '#B72A00' },
|
||||
{ text: '] ', color: 'dark_gray'}
|
||||
]
|
||||
let component = [];
|
||||
let term = `${args.join(' ')}`
|
||||
const query = new URLSearchParams({ term });
|
||||
const dictResult = await request(`https://api.urbandictionary.com/v0/define?${query}`);
|
||||
const { list } = await dictResult.body.json();
|
||||
if (!list.length) {
|
||||
bot.tellraw('@a', { text: 'No results found', color: 'dark_red' });
|
||||
}
|
||||
for (definitions of list) {
|
||||
component.push(prefix, [
|
||||
{
|
||||
text: `${definitions.definition.replaceAll('\r','').replaceAll('[', '\xa71\xa7n\xa7o').replaceAll(']','\xa7r\xa77')}\n`,
|
||||
color: 'gray',
|
||||
underlined: false,
|
||||
italic: false,
|
||||
translate:"",
|
||||
hoverEvent: {
|
||||
action:"show_text",
|
||||
value: [
|
||||
{
|
||||
text: `Example \u203a \n ${definitions.example.replaceAll('\r', '').replaceAll('[', '\xa71\xa7n\xa7o').replaceAll(']','\xa7r\xa77')}\n`,
|
||||
color: 'gray'
|
||||
},
|
||||
{
|
||||
text: `Word \u203a ${definitions.word.replaceAll('\r', '').replaceAll('[', '\xa71\xa7n\xa7o').replaceAll(']','\xa7r\xa77')}\n`,
|
||||
color: 'gray',
|
||||
},
|
||||
{
|
||||
text: `Author \u203a ${definitions.author.replaceAll('\r', '').replaceAll('[', '\xa71\xa7n\xa7o').replaceAll(']','\xa7r\xa77')}\n`,
|
||||
color: 'gray'
|
||||
},
|
||||
{
|
||||
text: `written on \u203a ${definitions.written_on.replaceAll('\r', '').replaceAll('[', '\xa71\xa7n\xa7o').replaceAll(']','\xa7r\xa77')}\n`,
|
||||
color: 'gray'
|
||||
},
|
||||
{
|
||||
text: `Rating \u203a Thumbs-Up ${definitions.thumbs_up} / Thumbs-Down ${definitions.thumbs_down}`,
|
||||
color: 'gray'
|
||||
}
|
||||
]
|
||||
},
|
||||
clickEvent: {
|
||||
action: 'open_url',
|
||||
value: `${definitions.permalink}`
|
||||
}
|
||||
},
|
||||
])
|
||||
}
|
||||
if (bot.options.useChat) {
|
||||
for (const definitions of list) {
|
||||
bot.chat.message(bot.getMessageAsPrismarine({ text: `${definitions.example.replaceAll('\r','').replaceAll('[', '\xa71\xa7n\xa7o').replaceAll(']','\xa7r\xa77')}\n`})?.toMotd().replaceAll("§","&"));
|
||||
// bot.chat.message(definitions.example.replaceAll("\r", ""));
|
||||
}
|
||||
} else {
|
||||
bot.tellraw(`@a[name="${source?.player?.profile?.name}"]`, component)
|
||||
}
|
||||
},
|
||||
async discordExecute (context) {
|
||||
const bot = context.bot;
|
||||
const args = context.arguments;
|
||||
const component = [];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,54 +0,0 @@
|
||||
const { EmbedBuilder } = require('discord.js');
|
||||
module.exports = {
|
||||
name: 'validate',
|
||||
trustLevel: 1,
|
||||
aliases: [
|
||||
"val"
|
||||
],
|
||||
description: 'validate through the bot',
|
||||
usages: [
|
||||
""
|
||||
],
|
||||
execute (context) {
|
||||
const bot = context.bot;
|
||||
const args = context.arguments;
|
||||
const source = context.source;
|
||||
/* if (args[0] === bot.validation.trusted) {
|
||||
if (bot.options.isSavage) {
|
||||
bot.chat.message('&2Valid Trusted hash');
|
||||
} else {
|
||||
bot.tellraw(`@a`, { text: "Valid Trusted hash", color: "dark_green" });
|
||||
}
|
||||
}
|
||||
if (args[0] === bot.validation.owner) {
|
||||
if (bot.options.isSavage) {
|
||||
bot.chat.message("&2Valid Owner hash");
|
||||
} else {
|
||||
bot.tellraw(`@a`, { text: "Valid Owner hash", color: "dark_green" });
|
||||
}
|
||||
}*/
|
||||
if (args[0] === bot.validation.trusted) {
|
||||
bot.chat.message('&2Valid Trusted hash');
|
||||
}
|
||||
if (args[0] === bot.validation.admin) {
|
||||
bot.chat.message('&2Valid Admin hash');
|
||||
}
|
||||
if (args[0] === bot.validation.owner) {
|
||||
bot.chat.message('&2Valid Owner hash');
|
||||
}
|
||||
},
|
||||
discordExecute (context) {
|
||||
const bot = context.bot;
|
||||
const event = bot?.discord?.message
|
||||
const roles = event?.member?.roles?.cache
|
||||
const source = context.source;
|
||||
console.log(Object.keys(bot.discord.message.member.user.username));
|
||||
if (roles?.some(role => role.name === `${config.discord.roles.trusted}`)) {
|
||||
bot.discord.message.reply('Valid trusted user')
|
||||
bot.chat.message(`Valid trusted user [${bot.discord.message.member.user.username}]`)
|
||||
} else if (roles?.some(role => role.name === `${config.discord.roles.owner}`)) {
|
||||
bot.discord.message.reply('Valid Owner user')
|
||||
bot.chat.message(`Valid Owner User [${bot.discord.message.member.user.username}]`);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,106 +0,0 @@
|
||||
const http = require('http');
|
||||
const https = require('https');
|
||||
const util = require('util');
|
||||
const fixansi = require('../util/ansi');
|
||||
const CommandError = require('../util/command_error')
|
||||
module.exports = {
|
||||
name: 'website',
|
||||
trustLevel: 1,
|
||||
aliases: [
|
||||
],
|
||||
description: 'look up website data',
|
||||
usages: [
|
||||
"<url>"
|
||||
],
|
||||
execute (context) {
|
||||
const bot = context.bot
|
||||
const args = context.arguments;
|
||||
if (args.slice(1).join(' ').toLowerCase().startsWith("http://")) {
|
||||
http.get(args.slice(1).join(' '), (res) => {
|
||||
const { statusCode } = res;
|
||||
const contentType = res.headers['content-type'];
|
||||
res.setEncoding('utf8');
|
||||
let rawData = '';
|
||||
res.on('data', (chunk) => { rawData += chunk; });
|
||||
res.on('end', () => {
|
||||
try {
|
||||
bot.tellraw("@a", { text: util.inspect(rawData.toString().substring(0, 32750)), color: "dark_green" })
|
||||
} catch (e) {
|
||||
bot.tellraw("@a", e.toString());
|
||||
}
|
||||
});
|
||||
}).on('error', (e) => {
|
||||
bot.chat.message(`&4${e.toString()}`);
|
||||
});
|
||||
} else {
|
||||
https.get(args.slice(1).join(' '), (res) => {
|
||||
res.on('data', (d) => {
|
||||
bot.tellraw("@a", { text: util.inspect(d.toString().substring(0, 32750)), color: "dark_green", })
|
||||
// console.log(Object.keys(d.toString().length));
|
||||
});
|
||||
}).on('error', (e) => {
|
||||
bot.chat.message(`&4${e.toString()}`);
|
||||
});
|
||||
}
|
||||
},
|
||||
discordExecute (context) {
|
||||
const bot = context.bot;
|
||||
const args = context.arguments;
|
||||
const config = context.config;
|
||||
let Embed;
|
||||
let fix;
|
||||
let ansi;
|
||||
//bot.discord.message.reply('e');
|
||||
if (args.join(' ').toLowerCase().startsWith("http://")) {
|
||||
http.get(args.join(' '), (res) => {
|
||||
const { statusCode } = res;
|
||||
const contentType = res.headers['content-type'];
|
||||
res.setEncoding('utf8');
|
||||
let rawData = '';
|
||||
res.on('data', (chunk) => { rawData += chunk; });
|
||||
res.on('end', () => {
|
||||
// try {
|
||||
// bot.tellraw("@a", { text: util.inspect(rawData), color: "dark_green" })
|
||||
ansi = bot.getMessageAsPrismarine({ text: util.inspect(rawData.toString()), color: 'dark_green'})?.toAnsi()
|
||||
fix = fixansi(ansi.replaceAll('`', '`\u200b'))
|
||||
Embed = new EmbedBuilder()
|
||||
.setColor(`${config.colors.discord.embed}`)
|
||||
.setTitle(`${this.name} Command`)
|
||||
.setDescription(`\`\`\`ansi\n${fix}\n\`\`\``)
|
||||
bot.discord.message.reply({ embeds: [Embed] })
|
||||
// } catch (e) {
|
||||
// bot.tellraw("@a", e.toString());
|
||||
//throw new CommandError(e.toString())
|
||||
// }
|
||||
});
|
||||
}).on('error', (e) => {
|
||||
//bot.chat.message(`&4${e.toString()}`);
|
||||
});
|
||||
} else {
|
||||
https.get(args.join(' '), (res) => {
|
||||
res.on('data', (d) => {
|
||||
// bot.tellraw("@a", { text: util.inspect(d.toString()), color: "dark_green", })
|
||||
// console.log(Object.keys(d.toString().length));
|
||||
ansi = bot.getMessageAsPrismarine({ text: util.inspect(d.toString()), color: 'dark_green'})?.toAnsi()
|
||||
fix = fixansi(ansi.replaceAll('`', '`\u200b'))
|
||||
Embed = new EmbedBuilder()
|
||||
.setColor(`${config.colors.discord.embed}`)
|
||||
.setTitle(`${this.name} Command`)
|
||||
.setDescription(`\`\`\`ansi\n${fix}\n\`\`\``)
|
||||
bot.discord.message.reply({ embeds: [Embed] })
|
||||
// bot.discord.message.reply('e');
|
||||
});
|
||||
}).on('error', (e) => {
|
||||
//bot.chat.message(`&4${e.toString()}`);
|
||||
//throw new CommandError(e.toString())
|
||||
});
|
||||
/*
|
||||
Embed = new EmbedBuilder()
|
||||
.setColor(`${config.colors.discord.embed}`)
|
||||
.setTitle(`${this.name} Command`)
|
||||
.setDescription(`\`\`\`ansi\n${fix1}\n\`\`\``)
|
||||
bot.discord.message.reply({ embeds: [Embed] })
|
||||
*/
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
const wiki = require('wikipedia')
|
||||
const CommandError = require('../util/command_error')
|
||||
const { EmbedBuilder } = require('discord.js')
|
||||
module.exports = {
|
||||
name: 'wiki',
|
||||
description:['wikipedia'],
|
||||
trustLevel: 0,
|
||||
aliases:['wikipedia'],
|
||||
usage:["<definition>"],
|
||||
async execute (context) {
|
||||
const source = context.source
|
||||
const args = context.arguments
|
||||
const bot = context.bot
|
||||
try {
|
||||
const page = await wiki.page(args.join(' '))
|
||||
const summary = await page.intro();
|
||||
bot.tellraw(`@a`, { text: `${summary}`, color: 'gray' });
|
||||
} catch (error) {
|
||||
if (error.toString() === "pageError: TypeError: Cannot read properties of undefined (reading 'pages')") {
|
||||
bot.tellraw(`@a`, { text: 'Definition not found!', color: 'dark_red' })
|
||||
} else {
|
||||
bot.tellraw(`@a`, `${error.toString()}`)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
const { parseString } = require('xml2js');
|
||||
const CommandError = require('../util/command_error')
|
||||
const util = require('util');
|
||||
module.exports = {
|
||||
name: 'xml',
|
||||
trustLevel: 3,
|
||||
aliases: [
|
||||
],
|
||||
description: 'eval xml shit',
|
||||
usages: [
|
||||
"<xml code>"
|
||||
],
|
||||
execute (context) {
|
||||
const bot = context.bot;
|
||||
const args = context.arguments;
|
||||
parseString(args.slice(1).join(' '), function (err, result) {
|
||||
if (err) throw new CommandError(err.toString())
|
||||
bot.tellraw("@a", [
|
||||
{
|
||||
text: "Result \u203a \n",
|
||||
color: "gray"
|
||||
},
|
||||
{
|
||||
text: `${util.inspect(result)}`
|
||||
}
|
||||
])
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -1,681 +0,0 @@
|
||||
[
|
||||
{
|
||||
"name": {
|
||||
"text": "HBot",
|
||||
"color": "aqua",
|
||||
"bold": false
|
||||
},
|
||||
"authors": [
|
||||
"hhhzzzsss"
|
||||
],
|
||||
"exclaimer": "HBOT HARRYBUTT LMAOOOOOOOOOOOOOOOOO",
|
||||
"foundation": "java/mcprotocollib",
|
||||
"prefixes": [
|
||||
"#"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": [
|
||||
{
|
||||
"text": "FBot",
|
||||
"color": "gold"
|
||||
}
|
||||
],
|
||||
"authors": [
|
||||
"popbob/aaa"
|
||||
],
|
||||
"exclaimer": "",
|
||||
"foundation": "nodejs/node-minecraft-protocol",
|
||||
"prefixes": [
|
||||
"+"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": [
|
||||
{
|
||||
"text": "Hydra",
|
||||
"color": "dark_red"
|
||||
}
|
||||
],
|
||||
"authors": [
|
||||
"popbob/aaa"
|
||||
],
|
||||
"exclaimer": "",
|
||||
"foundation": "nodejs/node-minecraft-protocol",
|
||||
"prefixes": [
|
||||
"+",
|
||||
"$",
|
||||
"h:",
|
||||
"hydra:"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": [
|
||||
{
|
||||
"text": "JokerBot",
|
||||
"color": "green"
|
||||
}
|
||||
],
|
||||
"authors": [
|
||||
"zXzy",
|
||||
"12alex12"
|
||||
],
|
||||
"exclaimer": "",
|
||||
"foundation": "nodejs/mineflayer",
|
||||
"prefixes": [
|
||||
"\\"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"text": "CddehhBot",
|
||||
"color": "red",
|
||||
"bold": false
|
||||
},
|
||||
"authors": [
|
||||
"CaydennO1",
|
||||
"spyingcreeper09"
|
||||
],
|
||||
"exclaimer": "WHAT IS THIS GOOFY AAAH FUCKING BOT FUCKING PIECE OF RETARDED ASS SHIT BOT ITS SO FUCKING SHIT I WANNA IPFILTER IT WITH FUCKING CHOMENS",
|
||||
"foundation": "nodejs/mineflayer",
|
||||
"prefixes": [
|
||||
","
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"text": "TurtleBot",
|
||||
"color": "green",
|
||||
"bold": false
|
||||
},
|
||||
"authors": [
|
||||
"TurtleKid"
|
||||
],
|
||||
"exclaimer": "nmp when?",
|
||||
"foundation": "nodejs/mineflayer",
|
||||
"prefixes": [
|
||||
"\\"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"text": "NothingBot",
|
||||
"color": "dark_red",
|
||||
"bold": false
|
||||
},
|
||||
"authors": [
|
||||
"Yaode_owo"
|
||||
],
|
||||
"exclaimer": "uwu",
|
||||
"foundation": "nodejs/mineflayer",
|
||||
"prefixes": [
|
||||
"?"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"text": "SC09Bot",
|
||||
"color": "dark_gray",
|
||||
"bold": false
|
||||
},
|
||||
"authors": [
|
||||
"spyingcreeper09"
|
||||
],
|
||||
"exclaimer": ":3",
|
||||
"foundation": "nodejs/node-minecraft-protocol",
|
||||
"prefixes": [
|
||||
"@"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"text": "HorizonBot",
|
||||
"color": "gold",
|
||||
"bold": false
|
||||
},
|
||||
"authors": [
|
||||
"ZenZoya",
|
||||
"Yaode_owo",
|
||||
"Parker2991",
|
||||
"and others"
|
||||
],
|
||||
"exclaimer": "originally called §5FleamBot§r",
|
||||
"foundation": "nodejs/node-minecraft-protocol",
|
||||
"prefixes": [
|
||||
"^"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"text": "64Bot",
|
||||
"color": "gold",
|
||||
"bold": false
|
||||
},
|
||||
"authors": [
|
||||
"64Will64"
|
||||
],
|
||||
"exclaimer": "NINTENDO 64?!?!??!?! 69Bot when??????",
|
||||
"foundation": "NodeJS/Mineflayer",
|
||||
"prefixes": [
|
||||
"w="
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"text": "Nebulabot",
|
||||
"color": "dark_purple",
|
||||
"bold": false
|
||||
},
|
||||
"authors": [
|
||||
"IuCC"
|
||||
],
|
||||
"exclaimer": "the void",
|
||||
"foundation": "NodeJS/Node-minecraft-protocol",
|
||||
"prefixes": [
|
||||
"["
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": [
|
||||
{
|
||||
"text": "Prism",
|
||||
"color": "#00FF9C",
|
||||
"bold": true
|
||||
},
|
||||
{
|
||||
"text": "Bot",
|
||||
"color": "white",
|
||||
"bold": true
|
||||
}
|
||||
],
|
||||
"authors": [
|
||||
"IuCC"
|
||||
],
|
||||
"exclaimer": "prismarine :3",
|
||||
"foundation": "NodeJS/Node-minecraft-protocol",
|
||||
"prefixes": [
|
||||
"["
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"text": "SharpBot",
|
||||
"color": "aqua",
|
||||
"bold": false
|
||||
},
|
||||
"authors": [
|
||||
"64Will64"
|
||||
],
|
||||
"exclaimer": "sharp as in the tv? idfk im out of jokes also the first c# bot on the list??",
|
||||
"foundation": "C#/MineSharp",
|
||||
"prefixes": [
|
||||
"s="
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"text": "MoonBot",
|
||||
"color": "red",
|
||||
"bold": false
|
||||
},
|
||||
"authors": [
|
||||
"64Will64"
|
||||
],
|
||||
"exclaimer": "stop mooning/mooing me ",
|
||||
"foundation": "NodeJS/Mineflayer",
|
||||
"prefixes": [
|
||||
"m="
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"text": "TableBot",
|
||||
"color": "yellow",
|
||||
"bold": false
|
||||
},
|
||||
"authors": [
|
||||
"12alex12"
|
||||
],
|
||||
"exclaimer": "TABLE CLOTH BOT?!?! ",
|
||||
"foundation": "NodeJS/Node-minecraft-protocol",
|
||||
"prefixes": [
|
||||
"t!"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": [
|
||||
{
|
||||
"text": "Evil",
|
||||
"color": "dark_red",
|
||||
"bold": false
|
||||
},
|
||||
{
|
||||
"text": "Bot",
|
||||
"color": "dark_purple"
|
||||
}
|
||||
],
|
||||
"authors": [
|
||||
"FusseligerDev"
|
||||
],
|
||||
"exclaimer": "",
|
||||
"foundation": "Java/Custom",
|
||||
"prefixes": [
|
||||
"!"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"text": "SBot Java",
|
||||
"color": "white",
|
||||
"bold": false
|
||||
},
|
||||
"authors": [
|
||||
"evkc"
|
||||
],
|
||||
"foundation": "Java/MCProtocolLib",
|
||||
"prefixes": [
|
||||
":"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"text": "SBot Rust",
|
||||
"color": "white",
|
||||
"bold": false
|
||||
},
|
||||
"authors": [
|
||||
"evkc"
|
||||
],
|
||||
"foundation": "Rust",
|
||||
"prefixes": [
|
||||
"re:"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"text": "Z-Boy-Bot",
|
||||
"color": "dark_purple",
|
||||
"bold": false
|
||||
},
|
||||
"exclaimer": "Most likely skidded along with kbot that the dev used",
|
||||
"authors": [
|
||||
"Romnci"
|
||||
],
|
||||
"foundation": "NodeJS/mineflayer or Java/mcprotocollib idfk",
|
||||
"prefixes": [
|
||||
"Z]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"text": "ABot",
|
||||
"color": "gold",
|
||||
"bold": true
|
||||
},
|
||||
"exclaimer": "not used anymore (replaced by V2)",
|
||||
"authors": [
|
||||
{
|
||||
"text": "_yfd",
|
||||
"color": "light_purple"
|
||||
}
|
||||
],
|
||||
"foundation": "NodeJS/Node-Minecraft-Protocol",
|
||||
"prefixes": [
|
||||
"<"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"text": "ABot-V2",
|
||||
"color": "gold",
|
||||
"bold": true
|
||||
},
|
||||
"exclaimer": "",
|
||||
"authors": [
|
||||
{
|
||||
"text": "_yfd",
|
||||
"color": "light_purple"
|
||||
}
|
||||
],
|
||||
"foundation": "NodeJS/Node-Minecraft-Protocol",
|
||||
"prefixes": [
|
||||
"<"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"text": "FardBot",
|
||||
"color": "light_purple",
|
||||
"bold": false
|
||||
},
|
||||
"authors": [
|
||||
"_yfd"
|
||||
],
|
||||
"exclaimer": "bot is dead lol",
|
||||
"foundation": "NodeJS/Mineflayer",
|
||||
"prefixes": [
|
||||
"<"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"text": "ChipmunkBot Java",
|
||||
"color": "green",
|
||||
"bold": false
|
||||
},
|
||||
"authors": [
|
||||
"_ChipMC_"
|
||||
],
|
||||
"exclaimer": "chips? also shoutout to chip and chayapak for helping in the rewrite",
|
||||
"foundation": "Java/MCProtocolLib",
|
||||
"prefixes": [
|
||||
"'",
|
||||
"/'"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"text": "ChipmunkBot NodeJS",
|
||||
"color": "green",
|
||||
"bold": false
|
||||
},
|
||||
"authors": [
|
||||
"_ChipMC_"
|
||||
],
|
||||
"foundation": "NodeJS/Node-Minecraft-Protocol"
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"text": "TestBot",
|
||||
"color": "aqua",
|
||||
"bold": false
|
||||
},
|
||||
"authors": [
|
||||
"Blackilykat"
|
||||
],
|
||||
"foundation": "Java/MCProtocolLib",
|
||||
"prefixes": [
|
||||
"-"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"text": "UBot",
|
||||
"color": "gray",
|
||||
"bold": false
|
||||
},
|
||||
"authors": [
|
||||
"HexWoman"
|
||||
],
|
||||
"exclaimer": "UwU OwO",
|
||||
"foundation": "NodeJS/node-minecraft-protocol",
|
||||
"prefixes": [
|
||||
"\""
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"text": "ChomeNS Bot Java",
|
||||
"color": "yellow",
|
||||
"bold": false
|
||||
},
|
||||
"authors": [
|
||||
"chayapak"
|
||||
],
|
||||
"exclaimer": "wow its my bot !! ! 4374621q43567%^&#%67868-- chayapak \n rip ChomeNS bot i wonder what chayapak is currently doing -- Parker2991",
|
||||
"foundation": "Java/MCProtocolLib",
|
||||
"prefixes": [
|
||||
"*",
|
||||
"cbot ",
|
||||
"/cbot "
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"text": "ChomeNS Bot NodeJS",
|
||||
"color": "yellow",
|
||||
"bold": false
|
||||
},
|
||||
"authors": [
|
||||
"chayapak"
|
||||
],
|
||||
"foundation": "NodeJS/Node-Minecraft-Protocol",
|
||||
"prefixes": [
|
||||
"*",
|
||||
"cbot",
|
||||
"/cbot"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"text": "RecycleBot",
|
||||
"color": "dark_green",
|
||||
"bold": false
|
||||
},
|
||||
"foundation": [
|
||||
"MorganAnkan"
|
||||
],
|
||||
"exclaimer": "nice bot",
|
||||
"language": "NodeJS/node-minecraft-protocol",
|
||||
"prefixes": [
|
||||
"="
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"text": "neobot",
|
||||
"color": "blue",
|
||||
"bold": false
|
||||
},
|
||||
"exclaimer": "n e o b o t ;oslkdfj;salkdfj;ladsjf",
|
||||
"authors": [
|
||||
"mirkokral"
|
||||
],
|
||||
"foundation": "java/MCProtocolLib",
|
||||
"prefixes": [
|
||||
"_"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"text": "ManBot",
|
||||
"color": "dark_green",
|
||||
"bold": false
|
||||
},
|
||||
"exclaimer": "(more like men bot :skull:) OH HAAAAAAAAAAAAAAIIILL LOGINTIMEDOUT",
|
||||
"authors": [
|
||||
"Man/LogintimedOut"
|
||||
],
|
||||
"foundation": "NodeJS/mineflayer",
|
||||
"prefixes": [
|
||||
"(Note:I dont remember!!)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": [
|
||||
{
|
||||
"text": "Useless",
|
||||
"color": "red",
|
||||
"bold": false
|
||||
},
|
||||
{
|
||||
"text": "Bot",
|
||||
"color": "gray",
|
||||
"bold": false
|
||||
}
|
||||
],
|
||||
"exclaimer": "it isnt useless its a good bot................",
|
||||
"authors": [
|
||||
"IuCC"
|
||||
],
|
||||
"foundation": "NodeJS/node-minecraft-protocol",
|
||||
"prefixes": [
|
||||
"["
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": [
|
||||
{
|
||||
"text": "SnifferBot",
|
||||
"color": "gold",
|
||||
"bold": false
|
||||
}
|
||||
],
|
||||
"exclaimer": "sniff sniff FNFBoyfriendBot simp",
|
||||
"authors": [
|
||||
"popbob/aaa"
|
||||
],
|
||||
"foundation": "NodeJS/Node-minecraft-protocol",
|
||||
"prefixes": [
|
||||
">"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": [
|
||||
{
|
||||
"text": "XBot",
|
||||
"color": "dark_purple",
|
||||
"bold": false
|
||||
}
|
||||
],
|
||||
"exclaimer": "",
|
||||
"authors": [
|
||||
"popbob/aaa"
|
||||
],
|
||||
"foundation": "ts-Node/Node-minecraft-protocol",
|
||||
"prefixes": [
|
||||
"$"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": [
|
||||
{
|
||||
"text": "Kitty",
|
||||
"color": "gold",
|
||||
"bold": false
|
||||
},
|
||||
{
|
||||
"text": "Corp",
|
||||
"color": "aqua",
|
||||
"bold": false
|
||||
},
|
||||
{
|
||||
"text": "Bot",
|
||||
"color": "yellow",
|
||||
"bold": false
|
||||
}
|
||||
],
|
||||
"exclaimer": "3 words ginlang is gay",
|
||||
"authors": [
|
||||
"ginlang , G6_, ArrayBuffer, and i guess more??"
|
||||
],
|
||||
"foundation": "NodeJS/node-minecraft-protocol",
|
||||
"prefixes": [
|
||||
"^"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": [
|
||||
{
|
||||
"text": "FNF",
|
||||
"color": "dark_purple",
|
||||
"bold": false
|
||||
},
|
||||
{
|
||||
"text": "Boyfriend",
|
||||
"color": "aqua",
|
||||
"bold": false
|
||||
},
|
||||
{
|
||||
"text": "Bot",
|
||||
"color": "dark_red",
|
||||
"bold": false
|
||||
},
|
||||
{
|
||||
"text": " nmp",
|
||||
"color": "black",
|
||||
"bold": false
|
||||
}
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"text": "Parker2991",
|
||||
"color": "dark_red"
|
||||
},
|
||||
{
|
||||
"text": " _ChipMC_",
|
||||
"color": "dark_green",
|
||||
"bold": false
|
||||
},
|
||||
{
|
||||
"text": " chayapak",
|
||||
"color": "yellow",
|
||||
"bold": false
|
||||
},
|
||||
{
|
||||
"text": " _yfd",
|
||||
"color": "light_purple",
|
||||
"bold": false
|
||||
},
|
||||
{
|
||||
"text": "popbob/aaa",
|
||||
"color": "gold"
|
||||
},
|
||||
{
|
||||
"text": "MorganAnkan",
|
||||
"color": "dark_green"
|
||||
},
|
||||
{
|
||||
"text": "TurtleKid",
|
||||
"color": "green"
|
||||
}
|
||||
],
|
||||
"exclaimer": "v4.0x - current",
|
||||
"foundation": "NodeJS/node-minecraft-protocol",
|
||||
"prefixes": [
|
||||
"~",
|
||||
"fnfbfbot ",
|
||||
"",
|
||||
"",
|
||||
"█"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": [
|
||||
{
|
||||
"text": "FNF",
|
||||
"color": "dark_purple",
|
||||
"bold": false
|
||||
},
|
||||
{
|
||||
"text": "Boyfriend",
|
||||
"color": "aqua",
|
||||
"bold": false
|
||||
},
|
||||
{
|
||||
"text": "Bot",
|
||||
"color": "dark_red",
|
||||
"bold": false
|
||||
},
|
||||
{
|
||||
"text": " legacy",
|
||||
"color": "green",
|
||||
"bold": false
|
||||
}
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"text": "Parker2991",
|
||||
"color": "dark_red"
|
||||
},
|
||||
{
|
||||
"text": " _ChipMC_",
|
||||
"color": "dark_green",
|
||||
"bold": false
|
||||
}
|
||||
],
|
||||
"exclaimer": "1037 LINES OF CODE WTFARD!??! also this version is in console commands only",
|
||||
"foundation": "NodeJS/mineflayer",
|
||||
"prefixes": []
|
||||
}
|
||||
]
|
||||
@@ -1,721 +0,0 @@
|
||||
[
|
||||
{
|
||||
"name": {
|
||||
"text": "v0.1.0 - v0.5.0-beta",
|
||||
"color": "blue",
|
||||
"bold": false
|
||||
},
|
||||
"authors": [
|
||||
"Prototypes"
|
||||
],
|
||||
"foundation": "11/22/22 - 1/24/23",
|
||||
"exclaimer": "ehh nothing much just the release of the betas"
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"text": "v1.0.0-beta",
|
||||
"color": "blue",
|
||||
"bold": false
|
||||
},
|
||||
"authors": [
|
||||
"in console test"
|
||||
],
|
||||
"foundation": "1/25/23",
|
||||
"exclaimer": "original commands:!cloop bcraw,!cloop sudo,!troll,!say,!op (broke),!deop (broke), !gms (broke),!freeze,!icu <--- these commands no longer can be used in game but in console for beta 1.0 commands added: fake kick,ban,kick,crashserver,stop,gmc,greetin,test(broken idk),bypass,entity spam ,gms ,stop,tntspam ,prefix ,annoy (broke results in a complete server crash keeping ayunboom down for 3 to 5 hours),freeze,crashserver,troll ,trol(more destructive),icu ,say,sudo,cloop"
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"text": "v1.0.0",
|
||||
"color": "dark_red",
|
||||
"bold": false
|
||||
},
|
||||
"authors": [
|
||||
"FNFBoyfriendBot"
|
||||
],
|
||||
"foundation": "1/26/23",
|
||||
"exclaimer": "FNFBoyfriendBot. commands added: BOOM,deop,troll and trol(added extra code to both commands),kaboom,serverdeop, commands fixed:tp,gms,annoy(attemps to crash the server but not as bad as it was) commands untested:prefix command Broke:icu,freeze,tntspam,entityspam,tntspam? changed name to &b &lFNFBoyfriendBot may change later idk"
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"text": "v1.0.1",
|
||||
"color": "green",
|
||||
"bold": false
|
||||
},
|
||||
"authors": [
|
||||
""
|
||||
],
|
||||
"foundation": "1/26/23",
|
||||
"exclaimer": "reworked the kaboom command and fixed the description commands but thats about it. also reworked the greeting command"
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"text": "v1.1.0",
|
||||
"color": "green",
|
||||
"bold": false
|
||||
},
|
||||
"authors": [
|
||||
""
|
||||
],
|
||||
"foundation": "1/26/23 2:00pm",
|
||||
"exclaimer": "nothing much just added extra stuff to the troll, trol and that is about it"
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"text": "v1.2.0",
|
||||
"color": "green",
|
||||
"bold": false
|
||||
},
|
||||
"authors": [
|
||||
""
|
||||
],
|
||||
"foundation": "1/28/23 1:51",
|
||||
"exclaimer": "for ppl me making me really mad -.- got released early"
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"text": "v2.0.0",
|
||||
"color": "dark_red",
|
||||
"bold": false
|
||||
},
|
||||
"authors": [
|
||||
"Major"
|
||||
],
|
||||
"foundation": "2/07/23 8:01pm",
|
||||
"exclaimer": "added DREAMSTANALERT,technoblade,GODSWORD,KFC,MYLEG,OHHAIL,altcrash,MyHead Reworked tntspam,entityspam,soundbreaker added Spim to the whitelist of the bot released too early than it was planned gonna be released due do the code almost leaked it had to be released early"
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"text": "v2.1.0",
|
||||
"color": "green",
|
||||
"bold": false
|
||||
},
|
||||
"authors": [
|
||||
""
|
||||
],
|
||||
"foundation": "2/11/23 5:30pm",
|
||||
"exclaimer": "added: refillcore(had early prototypes of this was original), vanish,deop,cloopdeop,mute,cloopmute reworked: op (supposed to already op the bot but didnt work until this release) and reworked gmc (same problem with op) (had early prototypes of vanish,refillcore,gmc,and op but these were original gonna be automatic but after alot of attempts i said screw it and added 2 commands refillcore, and vanish reworked gmc and op and got them working finally) removed Spim because come to find out he couldnt be trusted"
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"text": "v2.2.0",
|
||||
"color": "green",
|
||||
"bold": false
|
||||
},
|
||||
"authors": [
|
||||
""
|
||||
],
|
||||
"foundation": "2/20/23",
|
||||
"exclaimer": "added ckill(added back after trial and error),serversuicidal changed username of the bot from hex code to FNFBoyfriendBot because hex code for the username was confusing as it changes everytime"
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"text": "v3.0.0-Beta",
|
||||
"color": "blue",
|
||||
"bold": false
|
||||
},
|
||||
"authors": [
|
||||
"blue-balled corruption"
|
||||
],
|
||||
"foundation": "",
|
||||
"exclaimer": "was canceled due to ayunboom being rewriten and renamed to creayun barely usable on there because commands blocks are disabled which i created a bot for that server that has no command blocks just finished the final build of the Creayun build of the bot due to chip announcing that he may make a kaboom clone yk what 1.5.2 and 1.8 support but anyway onto what is in the v3.0-beta well the beta for right now commands added:discord,version,online,list,iownyou,endmysuffering,wafflehouse,whopper,bcraw,destroycore Notes:the original say command was reworked into talking in chat without bcraw and command blocks which the bcraw chatting code is still in the bot but was reworked into the bcraw commmand. maybe some commands removed? i dont know yet edit there is 2 commands removed commands removed:tpe and serverdeop??? reworked commands :say command for right now relay chat mabe will be added as a seperate repl i dont know yet possible would need a whole code rewrite for relay chat"
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"text": "v3.0.0",
|
||||
"color": "dark_red",
|
||||
"bold": false
|
||||
},
|
||||
"authors": [
|
||||
"Sky Remanifested"
|
||||
],
|
||||
"foundation": "",
|
||||
"exclaimer": "the full release of 3.0 the rewrite has been pushed back to 4.0 due to 3.0 already pass its release date and the code i had on hand was done but the rewrite wasnt done Added: SelfCare Made during development:Relay chat prototypes for several servers"
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"text": "v3.0.5",
|
||||
"color": "green",
|
||||
"bold": false
|
||||
},
|
||||
"authors": [
|
||||
""
|
||||
],
|
||||
"foundation": "",
|
||||
"exclaimer": "bug fixes"
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"text": "v3.0.9",
|
||||
"color": "green",
|
||||
"bold": false
|
||||
},
|
||||
"authors": [
|
||||
""
|
||||
],
|
||||
"foundation": "",
|
||||
"exclaimer": "commands added:Help(finally added after about a year),consolelog(added cuz yes),cloopconsolelog(added cuz yes)"
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"text": "v3.3.0",
|
||||
"color": "dark_red",
|
||||
"bold": false
|
||||
},
|
||||
"authors": [
|
||||
""
|
||||
],
|
||||
"foundation": "",
|
||||
"exclaimer": "switched it base to 4.0s base during 4.0s development"
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"text": "v4.0.0-beta",
|
||||
"color": "blue",
|
||||
"bold": false
|
||||
},
|
||||
"authors": [
|
||||
"FNFBoyfriendBot Ultimate"
|
||||
],
|
||||
"foundation": "",
|
||||
"exclaimer": "all of the command removed and or rewriten from version 3.0.9 Commands added or rewriten:ban,buyrealminecraft,cloop,discord,echo,errortest,freeze,help,icu,info,kick,bots,skids,romncitrash,say,selfdestruct,serversuicidal,sudo,test,trol,troll (note that this is different and is not CommandModules)Modules Added:discord,chat,chat_command_handler,command_manager,position,registry,reconnect,command_core CustomChats added:kaboom(for normal chat) (note that this is different and is not Modules)CommandModules Added:command_error,Command_source a beta release for rn"
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"text": "v4.0.0-Alpha ",
|
||||
"color": "aqua",
|
||||
"bold": false
|
||||
},
|
||||
"authors": [
|
||||
"FNFBoyfriendBot Ultimate"
|
||||
],
|
||||
"foundation": "",
|
||||
"exclaimer": "Commands added: calculator,ckill,evaljs,urban,crash,cloopcrash,core,list,ping,netmsg,skin,tpr Commands Removed:Buyrealminecraft (note that this is different and is not CommandModules)Modules Added:op selfcare,gmc selfcare,vanish selfcare,cspy selfcare,console (note that this is different and is not Modules)CustomChats Added:u2O3a(for custom chat) added util with between(for urban) eval_colors(for evaljs)"
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"text": "v4.0.0",
|
||||
"color": "dark_red",
|
||||
"bold": false
|
||||
},
|
||||
"authors": [
|
||||
"FNFBoyfriendBotX"
|
||||
],
|
||||
"foundation": "8/11/23",
|
||||
"exclaimer": "Bot is finished with the rewrite thank you ChipMC and chayapak for helping me rewrite the bot Heres the commands ban (mabe removing), blacklist (currently being worked on), botdevhistory, bots, calculator, changelog, ckill, cloop, cloopcrash(probably removing), core, crash, creators, discord, echo, errortest, evaljs, freeze, help, icu, list, meminfo, mineflayerbot, netmsg (Hello World!), ping (pong!), reconnect, say, selfdestruct, serversuicidal (probably removing because theres ckill), skin, sudo, test, tpr, trol (mabe renaming it to troll), troll (mabe removing it and replacing it with the trol command), urban (ong sus asf), validate, version"
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"text": "v4.0.5",
|
||||
"color": "green",
|
||||
"bold": false
|
||||
},
|
||||
"authors": [
|
||||
""
|
||||
],
|
||||
"foundation": "8/17/23",
|
||||
"exclaimer": "bug fixes, did what i said i was gonna do in the last update"
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"text": "v4.0.6",
|
||||
"color": "green",
|
||||
"bold": false
|
||||
},
|
||||
"authors": [
|
||||
""
|
||||
],
|
||||
"foundation": "8/22/23",
|
||||
"exclaimer": "added 1 console command along with updating console.js so that the bot sends a message to 1 server at a time and not a message to all the servers at a time"
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"text": "v4.0.7",
|
||||
"color": "green",
|
||||
"bold": false
|
||||
},
|
||||
"authors": [
|
||||
""
|
||||
],
|
||||
"foundation": "9/4/23",
|
||||
"exclaimer": "merged server and botusername commands and naming the command logininfo cuz it now shows the server ip, server port, Minecraft java Version, and the Bots Username"
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"text": "v4.0.8",
|
||||
"color": "green",
|
||||
"bold": false
|
||||
},
|
||||
"authors": [
|
||||
""
|
||||
],
|
||||
"foundation": "9/7/23",
|
||||
"exclaimer": "added the wiki command even though its semi working. bug fixes. some bugs still in the bot is netmsg showing the bots username when i used the netmsg cmd from my end and not the console i find it funny asf though"
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"text": "v4.0.8A",
|
||||
"color": "gold",
|
||||
"bold": false
|
||||
},
|
||||
"authors": [
|
||||
""
|
||||
],
|
||||
"foundation": "9/7/23",
|
||||
"exclaimer": "added some things to the changelog cmd. still needing to fix the issue with custom chat and netmsg also added a bugs command to check what bugs are needing to be fixed"
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"text": "v4.0.8B",
|
||||
"color": "gold",
|
||||
"bold": false
|
||||
},
|
||||
"authors": [
|
||||
""
|
||||
],
|
||||
"foundation": "9/8/23",
|
||||
"exclaimer": "made it to where it sends more messages on start up and made it to where the buildstring is in secrets"
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"text": "v4.0.8C",
|
||||
"color": "gold",
|
||||
"bold": false
|
||||
},
|
||||
"authors": [
|
||||
""
|
||||
],
|
||||
"foundation": "9/14/23",
|
||||
"exclaimer": "added the nodejs version to the version command but thats about it still fixing the bugs with the relay chat and mabe rewriting the validation system in the bot"
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"text": "v4.0.8D",
|
||||
"color": "gold",
|
||||
"bold": false
|
||||
},
|
||||
"authors": [
|
||||
""
|
||||
],
|
||||
"foundation": "9/16/23",
|
||||
"exclaimer": "added onto the changelog command along with adding spambot and lol commands (cuz yes) along with removing the bugs command maybe adding it back sometime later also the discord relay chat and validation system mabe getting a rewrite and also updated node from v18 to v20.6.0"
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"text": "v4.0.8E",
|
||||
"color": "gold",
|
||||
"bold": false
|
||||
},
|
||||
"authors": [
|
||||
""
|
||||
],
|
||||
"foundation": "9/17/23",
|
||||
"exclaimer": "changed the name for meminfo to serverinfo along with adding onto it and moving the nodejs, node-minecraft-protocol, and discord.js versions from the version command to the serverinfo command"
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"text": "v4.0.8F",
|
||||
"color": "gold",
|
||||
"bold": false
|
||||
},
|
||||
"authors": [
|
||||
""
|
||||
],
|
||||
"foundation": "9/24/23",
|
||||
"exclaimer": "added filesdirectories command but thats about it"
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"text": "v4.0.9",
|
||||
"color": "green",
|
||||
"bold": false
|
||||
},
|
||||
"authors": [
|
||||
""
|
||||
],
|
||||
"foundation": "9/26/23",
|
||||
"exclaimer": "added a hover event to the custom chat for the bot"
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"text": "v4.1.0",
|
||||
"color": "green",
|
||||
"bold": false
|
||||
},
|
||||
"authors": [
|
||||
""
|
||||
],
|
||||
"foundation": "9/27/23",
|
||||
"exclaimer": "Finally changed how the validation/hashing works in the bot instead of it being sent in discord there will be a key for trusted to validate"
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"text": "v4.1.1",
|
||||
"color": "green",
|
||||
"bold": false
|
||||
},
|
||||
"authors": [
|
||||
""
|
||||
],
|
||||
"foundation": "9/28/23",
|
||||
"exclaimer": "added uppercase and lowercase function for commands and soon gonna be completely overhauling the validation system in the bot again"
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"text": "v4.1.2",
|
||||
"color": "green",
|
||||
"bold": false
|
||||
},
|
||||
"authors": [
|
||||
""
|
||||
],
|
||||
"foundation": "10/02/23",
|
||||
"exclaimer": "added uptime as a command but thats it"
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"text": "v4.1.4",
|
||||
"color": "green",
|
||||
"bold": false
|
||||
},
|
||||
"authors": [
|
||||
""
|
||||
],
|
||||
"foundation": "10/03/23",
|
||||
"exclaimer": "moved the custom chat text and cmd block text to config.js"
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"text": "v4.1.6",
|
||||
"color": "green",
|
||||
"bold": false
|
||||
},
|
||||
"authors": [
|
||||
""
|
||||
],
|
||||
"foundation": "10/08/23",
|
||||
"exclaimer": "fixed the relay chat and fixed the cr issue with urban and also fixed reconnect"
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"text": "v4.1.7",
|
||||
"color": "green",
|
||||
"bold": false
|
||||
},
|
||||
"authors": [
|
||||
""
|
||||
],
|
||||
"foundation": "10/08/03",
|
||||
"exclaimer": "added mute, tag, and skin to selfcare"
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"text": "v4.1.8",
|
||||
"color": "green",
|
||||
"bold": false
|
||||
},
|
||||
"authors": [
|
||||
""
|
||||
],
|
||||
"foundation": "10/11/23",
|
||||
"exclaimer": "fixed the issue with memused cee mmm dee"
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"text": "v4.1.9",
|
||||
"color": "green",
|
||||
"bold": false
|
||||
},
|
||||
"authors": [
|
||||
""
|
||||
],
|
||||
"foundation": "10/12/23",
|
||||
"exclaimer": "rewrote evaljs its now using isolated-vm and not vm2"
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"text": "v4.2.0-restore",
|
||||
"color": "green",
|
||||
"bold": false
|
||||
},
|
||||
"authors": [
|
||||
""
|
||||
],
|
||||
"foundation": "10/19/23",
|
||||
"exclaimer": "fixed the disconnect message for discord and the bug with the say command"
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"text": "v4.2.1",
|
||||
"color": "green",
|
||||
"bold": false
|
||||
},
|
||||
"authors": [
|
||||
""
|
||||
],
|
||||
"foundation": "10/24/23",
|
||||
"exclaimer": "rewrote the help command to allow descriptions finally along with adding things to the base of the bot for the descriptions"
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"text": "v4.2.2",
|
||||
"color": "green",
|
||||
"bold": false
|
||||
},
|
||||
"authors": [
|
||||
""
|
||||
],
|
||||
"foundation": "10/25/23",
|
||||
"exclaimer": "merged serverinfo, memused, discord, logininfo, creators, version, uptime together"
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"text": "v4.2.3",
|
||||
"color": "green",
|
||||
"bold": false
|
||||
},
|
||||
"authors": [
|
||||
""
|
||||
],
|
||||
"foundation": "10/30/23",
|
||||
"exclaimer": "added a antiskid measure (thanks _yfd)"
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"text": "v4.2.4",
|
||||
"color": "green",
|
||||
"bold": false
|
||||
},
|
||||
"authors": [
|
||||
"Spooky update (note: might as well give it a codename since its halloween)"
|
||||
],
|
||||
"foundation": "10/31/23",
|
||||
"exclaimer": "merged fard and reconnect together making recend, added more crash methods to the crash command, and remove 12 commands"
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"text": "v4.2.5",
|
||||
"color": "green",
|
||||
"bold": false
|
||||
},
|
||||
"authors": [
|
||||
""
|
||||
],
|
||||
"foundation": "11/8/23",
|
||||
"exclaimer": "patched the exploit in the discordmsg command and made it to were with the netmsg command players cannot send empty messages"
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"text": "v4.3.0",
|
||||
"color": "green",
|
||||
"bold": false
|
||||
},
|
||||
"authors": [
|
||||
""
|
||||
],
|
||||
"foundation": "11/16/23",
|
||||
"exclaimer": "color coded the console logs are LOGS in the color gold consoleserver are in the category INFO in the color green, errors after start up are in the category WARN in the color yellow, Fatal Errors/start-up errors are in the category ERROR in the color red and hashs/validation codes sent to console are in the category HASH in the color green. added the command servereval. changed config.json to config.js and moved the username() function from the end of bot.js to the end of config.js and replacing where username() after options.username with 'Player' + Math.floor(Math.random() * 1000) and added player ping/latency to list along with fixing the bug with cloop list"
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"text": "v4.3.1",
|
||||
"color": "green",
|
||||
"bold": false
|
||||
},
|
||||
"authors": [
|
||||
""
|
||||
],
|
||||
"foundation": "11/21/23 one day till the bots anniversary?!?!",
|
||||
"exclaimer": "modified the bots boot originally it would spam the bots buildstring each time it logged into a server on boot but now it will only send it once to console on boot along with it now sending the foundationbuildstring after the buildstring sent in console. ported some commands over since chomens is pretty much dead along with adding chat support for chat.type.text and chat.type.emote"
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"text": "v4.3.2",
|
||||
"color": "green",
|
||||
"bold": false
|
||||
},
|
||||
"authors": [
|
||||
""
|
||||
],
|
||||
"foundation": "11/23/23",
|
||||
"exclaimer": "made the bots selfcare, the selfcares interval and console toggle-able along with making default options for the selfcare and its interval, the bots prefix, the bots discord prefix, the reconnectDelay interval, the core customname, and the console, partically fixed the issue with the trusted commands no being able to be ran in discord, edited the bots boot again it now also logs the amount of files its loading on boot its discord username its logged in with(also added the discord username to the info command)"
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"text": "v4.3.3",
|
||||
"color": "dark_red",
|
||||
"bold": false
|
||||
},
|
||||
"authors": [
|
||||
"Lullaby Girlfriend's LostCause"
|
||||
],
|
||||
"foundation": "12/3/23",
|
||||
"exclaimer": "added hover events to the help command for command descriptions, trust console and name along with click events for them added memusage and fixed the category issue with the console and added toggles to the bot for console, selfcare, and skin"
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"text": "v4.3.4",
|
||||
"color": "dark_red",
|
||||
"bold": false
|
||||
},
|
||||
"authors": [
|
||||
"Suffering Siblings"
|
||||
],
|
||||
"foundation": "12/12/23",
|
||||
"exclaimer": "overhauled the console and discord relay chat fixing trusted roles and making the selfcare toggleable in game also fixing the issue with hiding console only commands (thank you poopbob for helping me with that)"
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"text": "v5.0.0-Beta",
|
||||
"color": "blue",
|
||||
"bold": false
|
||||
},
|
||||
"authors": [
|
||||
"Monochrome"
|
||||
],
|
||||
"foundation": "12/18/23",
|
||||
"exclaimer": "added owner validation to the bot thats about it"
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"text": "v5.0.0",
|
||||
"color": "dark_red",
|
||||
"bold": false
|
||||
},
|
||||
"authors": [
|
||||
"Monochrome"
|
||||
],
|
||||
"foundation": "12/20/23",
|
||||
"exclaimer": "since the old validation system was able to barely handle owner validation it was completely remove and replaced with trust levels which handle validation way better also added command aliases (shoutouts to poopbob with the command aliases). made a whole new changelog command for v5.0.0 and renamed the old one changelogv4.3.4. also fixed the issue with the console not properly refreshing lines that are sent"
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"text": "v5.0.1",
|
||||
"color": "green",
|
||||
"bold": false
|
||||
},
|
||||
"authors": [
|
||||
""
|
||||
],
|
||||
"foundation": "added botsrun for the funni along with making the bot be able to auto refill its core now and fill the core from a command block(edit: nevermind its very buggy reverting it back to how it originally filled its core) and adding a hover event to netmsg along with having the test command tellraw the players display name in the command and added support for 3 command prefixes",
|
||||
"exclaimer": "12/23/23"
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"text": "v5.0.2",
|
||||
"color": "green",
|
||||
"bold": false
|
||||
},
|
||||
"authors": [
|
||||
""
|
||||
],
|
||||
"foundation": "12/26/23",
|
||||
"exclaimer": "fixed the issue with the cpu checking in the info command added discord hashing back into the bot to work along side the keys made it check to see if the config file is in the directory and if not it will recreate the config from default.js"
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"text": "v5.0.3",
|
||||
"color": "green",
|
||||
"bold": false
|
||||
},
|
||||
"authors": [
|
||||
""
|
||||
],
|
||||
"foundation": "12/29/23",
|
||||
"exclaimer": "mabe the bot last update of 2023 cuz next year will be 2024 www but anyway expanded the disconnect messages for both console and discord but thats pretty much it"
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"text": "v5.0.4",
|
||||
"color": "green",
|
||||
"bold": false
|
||||
},
|
||||
"authors": [
|
||||
""
|
||||
],
|
||||
"foundation": "1/12/24",
|
||||
"exclaimer": "first update of 2024 for the bot but anyway merged the test and errortest commands into cmdtest, changed the colors for the help command public is #00FFFF, trusted is dark_purple and owner remained as dark red. moved the module loader from bot.js to index.js to split the boot time in half which now allows module functions like bot.chat() to be used in bot.js and also since the command manager is a module it also loads the commands thats a w on all ends also removed some modules to improve the bots boot time and moved the functions for the sctoggle command into the command itself and not as a module which helped the boot time as well and last but not least merged the memused usage in the info command with the serverinfo usage and made the memusage command use the bossbar and not the actionbar"
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"text": "v5.0.5",
|
||||
"color": "dark_red",
|
||||
"bold": false
|
||||
},
|
||||
"authors": [
|
||||
{
|
||||
"text": "QT ",
|
||||
"color": "#f001db"
|
||||
},
|
||||
{
|
||||
"text": "KB ",
|
||||
"color": "#740000"
|
||||
},
|
||||
{
|
||||
"text": "Termination",
|
||||
"color": "black"
|
||||
}
|
||||
],
|
||||
"foundation": "1/26/24",
|
||||
"exclaimer": "added a new feature to the bot called Coreless Mode to where the core can be toggled and most commands using tellraw will use chat instead along with the discord relay chat, fixed the bug with trust and owner commands not running in console along with removing alot of useless commands and made the 3 prefixes a array and added ratelimit for console logging and command usage and added file chat logging back"
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"text": "v5.0.6A",
|
||||
"color": "gold",
|
||||
"bold": false
|
||||
},
|
||||
"authors": [
|
||||
"Interlope"
|
||||
],
|
||||
"foundation": "2/15/24",
|
||||
"exclaimer": "added music finally fixed coreless mode made a seperate function for discord in the command manager and idk what all"
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"text": "v5.0.7a",
|
||||
"color": "gold",
|
||||
"bold": false
|
||||
},
|
||||
"authors": [
|
||||
"Ski"
|
||||
],
|
||||
"foundation": "3/29/24",
|
||||
"exclaimer": "rewrote alot of shiiiiiiit :3 and added matrix support"
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"text": "v5.0.7b",
|
||||
"color": "gold",
|
||||
"bold": false
|
||||
},
|
||||
"authors": [
|
||||
"Ski"
|
||||
],
|
||||
"foundation": "4/22/24",
|
||||
"exclaimer": "a lot of clean up adding shit and more"
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"text": "v5.0.7c",
|
||||
"color": "gold",
|
||||
"bold": false
|
||||
},
|
||||
"authors": [
|
||||
"Ski"
|
||||
],
|
||||
"foundation": "5/1/24",
|
||||
"exclaimer": "added discord execute, redone the website command, added attachments for discord ported the urban package to the bot added ping"
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"text": "v5.0.8",
|
||||
"color": "dark_red",
|
||||
"bold": false
|
||||
},
|
||||
"authors": [
|
||||
"Censory Overload"
|
||||
],
|
||||
"foundation": "6/4/24",
|
||||
"exclaimer": "rewritten the urban command to use undici removed the music command changed the colors for the help command and more"
|
||||
}
|
||||
]
|
||||
@@ -1,57 +0,0 @@
|
||||
# FNFBoyfriendBot v6.0.0-alpha config
|
||||
|
||||
prefixes:
|
||||
- "!"
|
||||
- "fnfbfbot!"
|
||||
|
||||
discord:
|
||||
token: "discord token here"
|
||||
prefix: "!"
|
||||
invite: "discord invite here"
|
||||
roles:
|
||||
trusted: "trusted"
|
||||
admin: "admin"
|
||||
owner: "FNFBoyfriendBot Owner"
|
||||
|
||||
core:
|
||||
name: {"translate":"outOfMemory.message"}
|
||||
area:
|
||||
start:
|
||||
x: 0
|
||||
y: 0
|
||||
z: 0
|
||||
end:
|
||||
x: 15
|
||||
y: 0
|
||||
z: 15
|
||||
|
||||
commandSetMessage: true
|
||||
|
||||
keys:
|
||||
trusted: "trusted key here"
|
||||
admin: "admin key here"
|
||||
owner: "owner key here"
|
||||
|
||||
colors:
|
||||
discord:
|
||||
embed: "#000000"
|
||||
error: "#FF0000"
|
||||
|
||||
console:
|
||||
prefix: "c."
|
||||
filelogger: false
|
||||
|
||||
bots:
|
||||
- host: "localhost"
|
||||
username: "FNFBoyfriendBot"
|
||||
usernameGen: true
|
||||
version: "1.20.2"
|
||||
serverName: "localhost"
|
||||
reconnectDelay: 6000
|
||||
channelId: "discord channel id here"
|
||||
logging: false
|
||||
useChat: false
|
||||
isKaboom: true
|
||||
isSavage: false
|
||||
isCreayun: false
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
[]
|
||||
@@ -1,10 +0,0 @@
|
||||
{
|
||||
"bot": {
|
||||
"buildstring": {
|
||||
"version": "v6.0.3",
|
||||
"build":"1025",
|
||||
"codename":""
|
||||
},
|
||||
"source": "https://code.chipmunk.land/Parker2991/FridayNightFunkinBoyfriendBot/"
|
||||
}
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
const createBot = require('./bot.js');
|
||||
const readline = require('readline');
|
||||
const loadModules = require('./util/loadModules');
|
||||
const js_yaml = require('js-yaml');
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const { Client, GatewayIntentBits } = require('discord.js');
|
||||
const { MessageContent, GuildMessages, Guilds } = GatewayIntentBits;
|
||||
const discordClient = new Client({ intents: [Guilds, GuildMessages, MessageContent] });
|
||||
console.log('Starting FNFBoyfriendBot');
|
||||
if (!fs.existsSync(path.join(__dirname, "../config.yml"))) {
|
||||
console.log("Config not found creating config from the default config");
|
||||
fs.copyFileSync(
|
||||
path.join(__dirname, "./data/default_config.yml"),
|
||||
path.join(__dirname, "../config.yml")
|
||||
)
|
||||
}
|
||||
try {
|
||||
config = js_yaml.load(fs.readFileSync(path.join(__dirname, '../', 'config.yml')))
|
||||
} catch (e) {
|
||||
console.log(e.stack);
|
||||
}
|
||||
const rl = readline.createInterface({
|
||||
input: process.stdin,
|
||||
output: process.stdout,
|
||||
})
|
||||
if (config.discord.enabled) discordClient.login(config.discord.token);
|
||||
const bots = [];
|
||||
for (const options of config.bots) {
|
||||
const bot = new createBot(options, config);
|
||||
bots.push(bot);
|
||||
bot.bots = bots;
|
||||
loadModules(bot, options, config, discordClient);
|
||||
bot.console.readlineInterface(rl);
|
||||
}
|
||||
@@ -1,60 +0,0 @@
|
||||
const fs = require("fs");
|
||||
const path = require("path");
|
||||
const { createGzip } = require("zlib");
|
||||
const readline = require('readline');
|
||||
const { Console } = require("console");
|
||||
function consolefilelogger(bot, options, message) {
|
||||
const currentDate = new Date();
|
||||
const timestamp = `${currentDate.getFullYear()}-${(currentDate.getMonth() + 1)
|
||||
.toString()
|
||||
.padStart(2, "0")}-${currentDate.getDate().toString().padStart(2, "0")}`;
|
||||
const logFolder = path.join(__dirname, "../../logs");
|
||||
const logFileName = "latest.log";
|
||||
const logFilePath = path.join(logFolder, logFileName);
|
||||
const logStream = fs.createWriteStream(logFilePath, { flags: "a" });
|
||||
if (!fs.existsSync(path.join(__dirname, "../../logs"))) {
|
||||
fs.mkdirSync(path.join(__dirname, "../../logs"))
|
||||
}
|
||||
try {
|
||||
if (!fs.existsSync(logFolder)) {
|
||||
fs.mkdirSync(logFolder);
|
||||
}
|
||||
} catch (e) {
|
||||
console.error(`Unable to create log folder: ${e}`);
|
||||
}
|
||||
|
||||
function compressFile(input, output) {
|
||||
// if (!bot.Console.filelogging) return
|
||||
const plainOutput = output.slice(0, -3);
|
||||
|
||||
fs.renameSync(input, plainOutput);
|
||||
const gzip = createGzip();
|
||||
fs.createReadStream(plainOutput)
|
||||
.pipe(gzip)
|
||||
.pipe(fs.createWriteStream(output + ".tmp"))
|
||||
.once("finish", () => {
|
||||
fs.unlinkSync(plainOutput);
|
||||
fs.renameSync(output + ".tmp", output);
|
||||
});
|
||||
}
|
||||
|
||||
if (fs.existsSync(logFilePath)) {
|
||||
const plainName = fs
|
||||
.statSync(logFilePath)
|
||||
.ctime.toISOString()
|
||||
.split("T")[0];
|
||||
let name = plainName;
|
||||
let counter = 1;
|
||||
let newFileName = path.join(logFolder, `${name}.log.gz`);
|
||||
while (fs.existsSync(newFileName)) {
|
||||
name = `${plainName}-${counter}`;
|
||||
newFileName = path.join(logFolder, `${name}.log.gz`);
|
||||
counter++;
|
||||
}
|
||||
compressFile(logFilePath, newFileName);
|
||||
}
|
||||
bot.console.filelogging = function logging (message) {
|
||||
logStream.write(message + "\n");
|
||||
};
|
||||
}
|
||||
module.exports = consolefilelogger;
|
||||
@@ -0,0 +1,232 @@
|
||||
package land.chipmunk.parker2991.nitoribot;
|
||||
|
||||
import land.chipmunk.parker2991.nitoribot.logger.Logger;
|
||||
import land.chipmunk.parker2991.nitoribot.modules.*;
|
||||
import land.chipmunk.parker2991.nitoribot.util.ComponentUtil;
|
||||
import land.chipmunk.parker2991.nitoribot.listeners.*;
|
||||
import net.kyori.adventure.text.Component;
|
||||
|
||||
import org.geysermc.mcprotocollib.network.ProxyInfo;
|
||||
import org.geysermc.mcprotocollib.protocol.MinecraftProtocol;
|
||||
import org.geysermc.mcprotocollib.network.Session;
|
||||
import org.geysermc.mcprotocollib.network.event.session.DisconnectingEvent;
|
||||
import org.geysermc.mcprotocollib.network.event.session.DisconnectedEvent;
|
||||
import org.geysermc.mcprotocollib.network.event.session.PacketErrorEvent;
|
||||
import org.geysermc.mcprotocollib.network.event.session.SessionAdapter;
|
||||
import org.geysermc.mcprotocollib.network.session.ClientNetworkSession;
|
||||
import org.geysermc.mcprotocollib.network.factory.ClientNetworkSessionFactory;
|
||||
import org.geysermc.mcprotocollib.network.packet.Packet;
|
||||
import org.geysermc.mcprotocollib.auth.GameProfile;
|
||||
import org.geysermc.mcprotocollib.protocol.packet.ingame.serverbound.ServerboundPlayerLoadedPacket;
|
||||
import org.geysermc.mcprotocollib.protocol.packet.login.clientbound.ClientboundLoginFinishedPacket;
|
||||
import org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.ClientboundLoginPacket;
|
||||
import org.geysermc.mcprotocollib.protocol.packet.ingame.serverbound.ServerboundPlayerLoadedPacket;
|
||||
|
||||
import java.io.*;
|
||||
import java.net.InetSocketAddress;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
import java.util.concurrent.ScheduledExecutorService;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.Scanner;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.Map;
|
||||
|
||||
public class Bot extends SessionAdapter {
|
||||
public final ListenerManager listenerManager = new ListenerManager();
|
||||
|
||||
public boolean loggedIn = false;
|
||||
|
||||
public int entityId;
|
||||
|
||||
public final ScheduledExecutorService executor = Main.executor;
|
||||
|
||||
public final ExecutorService executorService = Main.executorService;
|
||||
|
||||
public ClientNetworkSession session;
|
||||
|
||||
public GameProfile profile;
|
||||
|
||||
public Config config;
|
||||
|
||||
public Config.Options options;
|
||||
|
||||
public List<Bot> bots;
|
||||
|
||||
public ChatModule chat;
|
||||
|
||||
public ConsoleModule console;
|
||||
|
||||
public SelfcareModule selfcare;
|
||||
|
||||
public PositionModule position;
|
||||
|
||||
public CommandCoreModule core;
|
||||
|
||||
public PlayerListModule players;
|
||||
|
||||
public RegistryModule registry;
|
||||
|
||||
public CommandManagerModule commandManager;
|
||||
|
||||
public ExtrasMessagingModule extrasMessaging;
|
||||
|
||||
public MCServerModule mcServer;
|
||||
|
||||
public ProxyInfo randomProxyIp () throws IOException {
|
||||
String result = null; // stub
|
||||
|
||||
Path proxiesPath = Paths.get("proxies.txt");
|
||||
|
||||
int countLines = Math.round(
|
||||
Files.lines(proxiesPath).count()
|
||||
);
|
||||
|
||||
Random random = new Random();
|
||||
|
||||
int randomIndex = random.nextInt(countLines);
|
||||
|
||||
String[] getIp = Files.lines(proxiesPath)
|
||||
.skip(randomIndex)
|
||||
.findAny()
|
||||
.get()
|
||||
.split(":");
|
||||
|
||||
String ip = getIp[0];
|
||||
int port = new Integer(getIp[1]);
|
||||
|
||||
return new ProxyInfo(
|
||||
ProxyInfo.Type.SOCKS5,
|
||||
new InetSocketAddress(ip, port)
|
||||
);
|
||||
}
|
||||
|
||||
public void loadModules () {
|
||||
try {
|
||||
this.chat = new ChatModule(this);
|
||||
this.selfcare = new SelfcareModule(this);
|
||||
this.position = new PositionModule(this);
|
||||
this.core = new CommandCoreModule(this);
|
||||
this.registry = new RegistryModule(this);
|
||||
this.players = new PlayerListModule(this);
|
||||
new LoggingModule(this);
|
||||
new ChatCommandHandlerModule(this);
|
||||
this.commandManager = new CommandManagerModule(this);
|
||||
this.extrasMessaging = new ExtrasMessagingModule(this);
|
||||
new TextDisplayModule(this);
|
||||
this.mcServer = new MCServerModule(this);
|
||||
} catch (Exception e) {}
|
||||
}
|
||||
|
||||
public Bot (Config.Options options, List<Bot> bots, Config config) {
|
||||
this.options = options;
|
||||
this.bots = bots;
|
||||
this.config = config;
|
||||
|
||||
try {
|
||||
connect();
|
||||
} catch (Exception e) {}
|
||||
};
|
||||
|
||||
public void connect () throws IOException {
|
||||
final MinecraftProtocol protocol = new MinecraftProtocol(options.username);
|
||||
|
||||
if (options.useProxy) session = ClientNetworkSessionFactory.factory()
|
||||
.setAddress(
|
||||
options.host,
|
||||
options.port
|
||||
)
|
||||
.setProxy(randomProxyIp())
|
||||
.setProtocol(protocol)
|
||||
.create();
|
||||
|
||||
else session = ClientNetworkSessionFactory.factory()
|
||||
.setAddress(
|
||||
options.host,
|
||||
options.port
|
||||
)
|
||||
.setProtocol(protocol)
|
||||
.create();
|
||||
session.addListener(this);
|
||||
loadModules();
|
||||
session.connect(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void disconnecting (DisconnectingEvent event) {
|
||||
String reason = event + "";
|
||||
session.disconnect(reason);
|
||||
}
|
||||
|
||||
// ServerboundPlayerLoadedPacket
|
||||
|
||||
@Override
|
||||
public void packetSent (Session session, Packet packet) {
|
||||
for (Listener listener : listenerManager.listeners) {
|
||||
listener.packetSent(session, packet);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void packetError (PacketErrorEvent error) {
|
||||
error.setSuppress(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void packetReceived (Session session, Packet packet) {
|
||||
try {
|
||||
if (packet instanceof ClientboundLoginPacket) this.session.send(
|
||||
ServerboundPlayerLoadedPacket.INSTANCE
|
||||
);
|
||||
|
||||
if (packet instanceof ServerboundPlayerLoadedPacket) {
|
||||
System.out.println(packet);
|
||||
}
|
||||
|
||||
for (Listener listener : listenerManager.listeners) {
|
||||
listener.packetReceived(session, packet);
|
||||
}
|
||||
|
||||
if (packet instanceof ClientboundLoginFinishedPacket) getProfile((ClientboundLoginFinishedPacket) packet);
|
||||
else if (packet instanceof ClientboundLoginPacket) getEntityId((ClientboundLoginPacket) packet);
|
||||
} catch (Exception e) { }
|
||||
}
|
||||
|
||||
|
||||
public void getProfile (ClientboundLoginFinishedPacket packet) {
|
||||
profile = packet.getProfile();
|
||||
|
||||
loggedIn = true;
|
||||
}
|
||||
|
||||
public void getEntityId (ClientboundLoginPacket packet) {
|
||||
entityId = packet.getEntityId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void disconnected (DisconnectedEvent event) {
|
||||
listenerManager.clearListener();
|
||||
|
||||
loggedIn = false;
|
||||
|
||||
Component component = event.getReason();
|
||||
|
||||
String reason = ComponentUtil.componentToAnsi(component);
|
||||
|
||||
int reconnectDelay = options.reconnectDelay;
|
||||
|
||||
Logger.RECONNECT(this, reason);
|
||||
|
||||
executor.schedule(() -> {
|
||||
try {
|
||||
connect();
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}, reconnectDelay, TimeUnit.MILLISECONDS);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package land.chipmunk.parker2991.nitoribot;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class Config {
|
||||
public List<String> prefixes;
|
||||
|
||||
public static class Core {
|
||||
public Area area = new Area();
|
||||
public String coreName;
|
||||
}
|
||||
|
||||
public static class Area {
|
||||
public Position start = new Position();
|
||||
public Position end = new Position();
|
||||
}
|
||||
|
||||
public static class Position {
|
||||
public int x = 0;
|
||||
public int y = 0;
|
||||
public int z = 0;
|
||||
}
|
||||
|
||||
public static class CommandColors {
|
||||
public String primary = "blue";
|
||||
public String secondary = "aqua";
|
||||
public String tertiary = "dark_aqua";
|
||||
}
|
||||
|
||||
public static class HelpCommandColors {
|
||||
public String Public = "blue";
|
||||
public String trusted = "dark_aqua";
|
||||
public String admin = "aqua";
|
||||
public String owner = "light_purple";
|
||||
public String console = "dark_purple";
|
||||
}
|
||||
|
||||
public static class Console {
|
||||
public String prefix = "c.";
|
||||
}
|
||||
|
||||
public static class Colors {
|
||||
public String integer = "gold";
|
||||
public CommandColors commands = new CommandColors();
|
||||
public HelpCommandColors help = new HelpCommandColors();
|
||||
}
|
||||
|
||||
public Colors colors = new Colors();
|
||||
|
||||
public Core core = new Core();
|
||||
|
||||
public Console console = new Console();
|
||||
|
||||
public Options[] bots = new Options[]{};
|
||||
|
||||
public static class Options {
|
||||
public String host;
|
||||
public int port;
|
||||
public boolean useProxy;
|
||||
public String serverName;
|
||||
public String username;
|
||||
public int reconnectDelay;
|
||||
public int selfcareInterval;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
package land.chipmunk.parker2991.nitoribot;
|
||||
|
||||
import land.chipmunk.parker2991.nitoribot.modules.ConsoleModule;
|
||||
|
||||
import org.yaml.snakeyaml.Yaml;
|
||||
import org.yaml.snakeyaml.LoaderOptions;
|
||||
import org.yaml.snakeyaml.constructor.Constructor;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.ScheduledExecutorService;
|
||||
|
||||
public class Main {
|
||||
public final Object obj = new Object();
|
||||
|
||||
public static final ExecutorService executorService = Executors.newFixedThreadPool(
|
||||
Runtime.getRuntime().availableProcessors()
|
||||
);
|
||||
|
||||
public static final ScheduledExecutorService executor = Executors.newScheduledThreadPool(
|
||||
Runtime.getRuntime().availableProcessors()
|
||||
);
|
||||
|
||||
public static Config config;
|
||||
|
||||
public static final List<Bot> Bots = new ArrayList<>();
|
||||
|
||||
public Config loadConfig() throws IOException {
|
||||
final Constructor yamlConfig = new Constructor(Config.class, new LoaderOptions());
|
||||
final Yaml yaml = new Yaml(yamlConfig);
|
||||
final Path configPath = Path.of("config.yaml");
|
||||
if (!Files.exists(configPath)) {
|
||||
|
||||
//LoggerManager.INFO(null, "config not found making config now");
|
||||
|
||||
InputStream defaultConfig = Main.class.getClassLoader().getResourceAsStream("default_config.yaml");
|
||||
Files.copy(defaultConfig, Paths.get("config.yaml"));
|
||||
}
|
||||
|
||||
InputStream configFile = Files.newInputStream(configPath);
|
||||
|
||||
config = yaml.load(configFile);
|
||||
return config;
|
||||
}
|
||||
|
||||
public static ConsoleModule console;
|
||||
|
||||
public void main(String[] args) {
|
||||
try {
|
||||
config = loadConfig();
|
||||
Config.Options[] bots = config.bots;
|
||||
|
||||
console = new ConsoleModule(config);
|
||||
for (Config.Options options : bots) {
|
||||
final Bot bot = new Bot(options, Bots, config);
|
||||
Bots.add(bot);
|
||||
}
|
||||
|
||||
synchronized(obj) {
|
||||
obj.wait();
|
||||
};
|
||||
} catch (Exception e) {
|
||||
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
package land.chipmunk.parker2991.nitoribot.chatparsers;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import land.chipmunk.parker2991.nitoribot.data.chat.*;
|
||||
import land.chipmunk.parker2991.nitoribot.Bot;
|
||||
import land.chipmunk.parker2991.nitoribot.data.PlayerProfileData;
|
||||
|
||||
import net.kyori.adventure.text.Component;
|
||||
import net.kyori.adventure.text.TextComponent;
|
||||
|
||||
public class KaboomChatParser implements ParseChatData {
|
||||
private Bot bot;
|
||||
private static Component SEPERATOR_COLON = Component.text(":");
|
||||
private static Component SEPERATOR_COLON_RACCOON = Component.text("\u00a7f:"); // https://github.com/raccoonserver/extras/commit/315f704075db2f00e3e1bfbf55f858469c22880f
|
||||
private static Component SEPERATOR_SPACE = Component.space();
|
||||
|
||||
public KaboomChatParser (Bot bot) {
|
||||
this.bot = bot;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlayerMessageData parse (Component message) {
|
||||
if (message instanceof TextComponent) return parse((TextComponent) message);
|
||||
return null;
|
||||
}
|
||||
|
||||
public PlayerMessageData parse (TextComponent message) {
|
||||
List<Component> children = message.children();
|
||||
|
||||
if (!message.content().equals("") || !message.style().isEmpty() || children == null || children.size() < 3) return null;
|
||||
|
||||
final Component prefix = children.get(0);
|
||||
Component displayName = Component.empty();
|
||||
Component contents = Component.empty();
|
||||
|
||||
if (isSeperatorAt(children, 1)) { // Missing/blank display name
|
||||
if (children.size() > 3) contents = children.get(3);
|
||||
} else if (isSeperatorAt(children, 2)) {
|
||||
displayName = children.get(1);
|
||||
if (children.size() > 4) contents = children.get(4);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
||||
PlayerProfileData sender = bot.players.getDisplayName(Component.empty().append(prefix).append(displayName));//getSender());
|
||||
return new PlayerMessageData(sender, contents, "minecraft:chat", displayName);
|
||||
}
|
||||
|
||||
private boolean isSeperatorAt (List<Component> children, int start) {
|
||||
return (children.get(start).equals(SEPERATOR_COLON) || children.get(start).equals(SEPERATOR_COLON_RACCOON)) && children.get(start + 1).equals(SEPERATOR_SPACE);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package land.chipmunk.parker2991.nitoribot.command;
|
||||
|
||||
import land.chipmunk.parker2991.nitoribot.Bot;
|
||||
|
||||
public class CommandContext {
|
||||
public Bot bot;
|
||||
|
||||
public String[] args;
|
||||
|
||||
public CommandSource source;
|
||||
|
||||
public CommandInfo commandData;
|
||||
|
||||
public CommandContext (Bot bot, String[] args, CommandSource source, CommandInfo commandData) {
|
||||
this.bot = bot;
|
||||
this.args = args;
|
||||
this.source = source;
|
||||
this.commandData = commandData;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package land.chipmunk.parker2991.nitoribot.command;
|
||||
|
||||
import net.kyori.adventure.text.Component;
|
||||
|
||||
public class CommandError extends Exception {
|
||||
public String name = "CommandError";
|
||||
public Component message;
|
||||
|
||||
public CommandError (Component message) {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public Component message () {
|
||||
return message;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package land.chipmunk.parker2991.nitoribot.command;
|
||||
|
||||
public abstract class CommandInfo {
|
||||
public String name;
|
||||
public CommandTrustLevels trustlevel;
|
||||
public String[] aliases;
|
||||
public String description;
|
||||
|
||||
public CommandInfo (String name, CommandTrustLevels trustlevel, String[] aliases, String description) {
|
||||
this.name = name;
|
||||
this.trustlevel = trustlevel;
|
||||
this.aliases = aliases;
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public abstract void execute (CommandContext context);
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
package land.chipmunk.parker2991.nitoribot.command;
|
||||
|
||||
import land.chipmunk.parker2991.nitoribot.data.PlayerProfileData;
|
||||
import land.chipmunk.parker2991.nitoribot.Bot;
|
||||
import land.chipmunk.parker2991.nitoribot.util.ComponentUtil;
|
||||
|
||||
import net.kyori.adventure.text.Component;
|
||||
|
||||
import org.cloudburstmc.math.vector.Vector3d;
|
||||
|
||||
public class CommandSource {
|
||||
private Bot bot;
|
||||
|
||||
public PlayerProfileData sender;
|
||||
|
||||
public boolean inGame;
|
||||
|
||||
public CommandSource (Bot bot, PlayerProfileData sender) {
|
||||
this.bot = bot;
|
||||
this.sender = sender;
|
||||
}
|
||||
|
||||
|
||||
public void sendFeedback (Component message) {
|
||||
String convertToJson = ComponentUtil.componentToJSON(message);
|
||||
Vector3d playerPos = sender.position.position();
|
||||
|
||||
String formatCommand = String.format(
|
||||
"minecraft:summon text_display %s %s %s {tag:[%s], text:%s}",
|
||||
playerPos.getX(),
|
||||
playerPos.getY(),
|
||||
playerPos.getZ(),
|
||||
"NitoriBot",
|
||||
convertToJson
|
||||
);
|
||||
|
||||
String selector = String.format(
|
||||
"@p[nbt={UUID:%s}]",
|
||||
sender.entityUUID
|
||||
);
|
||||
|
||||
bot.chat.tellraw(selector, message);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package land.chipmunk.parker2991.nitoribot.command;
|
||||
|
||||
public enum CommandTrustLevels {
|
||||
PUBLIC,
|
||||
TRUSTED,
|
||||
ADMIN,
|
||||
OWNER,
|
||||
CONSOLE,
|
||||
DISABLED
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package land.chipmunk.parker2991.nitoribot.commands.Public;
|
||||
|
||||
import land.chipmunk.parker2991.nitoribot.Bot;
|
||||
import land.chipmunk.parker2991.nitoribot.command.CommandContext;
|
||||
import land.chipmunk.parker2991.nitoribot.command.CommandInfo;
|
||||
import land.chipmunk.parker2991.nitoribot.command.CommandTrustLevels;
|
||||
|
||||
public class EchoCommand extends CommandInfo {
|
||||
public EchoCommand () {
|
||||
super(
|
||||
"echo",
|
||||
CommandTrustLevels.PUBLIC,
|
||||
new String[] { "say" },
|
||||
"make the bot say a message"
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(CommandContext context) {
|
||||
Bot bot = context.bot;
|
||||
String args = String.join(" ", context.args);
|
||||
if (args.startsWith("/")) {
|
||||
bot.chat.command(args.substring("/".length()));
|
||||
} else {
|
||||
bot.chat.message(args);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,153 @@
|
||||
package land.chipmunk.parker2991.nitoribot.commands.Public;
|
||||
|
||||
import land.chipmunk.parker2991.nitoribot.Bot;
|
||||
import land.chipmunk.parker2991.nitoribot.Config;
|
||||
import land.chipmunk.parker2991.nitoribot.command.*;
|
||||
import land.chipmunk.parker2991.nitoribot.util.TranslationsUtil;
|
||||
import land.chipmunk.parker2991.nitoribot.util.ComponentUtil;
|
||||
|
||||
import net.kyori.adventure.text.Component;
|
||||
import net.kyori.adventure.text.TextComponent;
|
||||
import net.kyori.adventure.text.TranslatableComponent;
|
||||
import net.kyori.adventure.text.format.NamedTextColor;
|
||||
import net.kyori.adventure.text.JoinConfiguration;
|
||||
import net.kyori.adventure.text.format.TextColor;
|
||||
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
public class HelpCommand extends CommandInfo {
|
||||
public HelpCommand () {
|
||||
super(
|
||||
"help",
|
||||
CommandTrustLevels.PUBLIC,
|
||||
new String[] { "heko", "hell", "?", "cmds"},
|
||||
"see the list of commands"
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
public Component getCommands (Bot bot) {
|
||||
List<Component> commandlist = new ArrayList<>();
|
||||
List<Component> Public = new ArrayList<>();
|
||||
List<Component> Trusted = new ArrayList<>();
|
||||
List<Component> Admin = new ArrayList<>();
|
||||
List<Component> Owner = new ArrayList<>();
|
||||
|
||||
for (CommandInfo commands : bot.commandManager.commands) {
|
||||
switch (commands.trustlevel) {
|
||||
case CommandTrustLevels.PUBLIC:
|
||||
Public.add(
|
||||
Component.text(commands.name + " ").color(NamedTextColor.BLUE)
|
||||
);
|
||||
break;
|
||||
case CommandTrustLevels.TRUSTED:
|
||||
Trusted.add(
|
||||
Component.text(commands.name + " ").color(NamedTextColor.DARK_AQUA)
|
||||
);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Component component = Component.empty()
|
||||
.append(Public)
|
||||
.append(Component.text("\n"))
|
||||
.append(Trusted);
|
||||
// .append(Component.text("\n"));
|
||||
|
||||
return component;
|
||||
}
|
||||
|
||||
private Component getCommand (Bot bot, String[] command) {
|
||||
List<Component> list = new ArrayList<>();
|
||||
|
||||
Component component = null;
|
||||
|
||||
for (CommandInfo commands : bot.commandManager.commands) {
|
||||
if (commands.name.equals(command[0])) component = Component.empty()
|
||||
.append(
|
||||
TranslationsUtil.customTranslations(
|
||||
"command.help.info.layout",
|
||||
List.of(
|
||||
TranslationsUtil.customTranslations("command.help.info.command", null).color(NamedTextColor.BLUE),
|
||||
Component.text(commands.name).color(NamedTextColor.AQUA)
|
||||
)
|
||||
)
|
||||
)
|
||||
.append(
|
||||
TranslationsUtil.customTranslations(
|
||||
"command.help.info.layout",
|
||||
List.of(
|
||||
TranslationsUtil.customTranslations("command.help.info.aliases", null).color(NamedTextColor.BLUE),
|
||||
Component.text(Arrays.toString(commands.aliases)).color(NamedTextColor.AQUA)
|
||||
)
|
||||
)
|
||||
)
|
||||
.append(
|
||||
TranslationsUtil.customTranslations(
|
||||
"command.help.info.layout",
|
||||
List.of(
|
||||
TranslationsUtil.customTranslations("command.help.info.description", null).color(NamedTextColor.BLUE),
|
||||
Component.text(commands.description).color(NamedTextColor.AQUA)
|
||||
)
|
||||
)
|
||||
)
|
||||
.append(
|
||||
TranslationsUtil.customTranslations(
|
||||
"command.help.info.layout",
|
||||
List.of(
|
||||
TranslationsUtil.customTranslations("command.help.info.trust_level", null).color(NamedTextColor.BLUE),
|
||||
Component.text(commands.trustlevel + "").color(NamedTextColor.AQUA)
|
||||
)
|
||||
)
|
||||
)
|
||||
.append(
|
||||
TranslationsUtil.customTranslations(
|
||||
"command.help.info.layout",
|
||||
List.of(
|
||||
TranslationsUtil.customTranslations("command.help.info.usages", null).color(NamedTextColor.BLUE),
|
||||
Component.text("DUMMY String").color(NamedTextColor.AQUA)
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
return component;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute (CommandContext context) {
|
||||
Bot bot = context.bot;
|
||||
String[] args = context.args;
|
||||
CommandSource source = context.source;
|
||||
Config config = bot.config;
|
||||
Config.Colors colors = config.colors;
|
||||
List<Component> list = new ArrayList<>();
|
||||
|
||||
if (args.length != 0) {
|
||||
source.sendFeedback(getCommand(bot, args));
|
||||
//return null;
|
||||
}
|
||||
|
||||
list = List.of(
|
||||
Component.text("Commands").color(NamedTextColor.NAMES.value(colors.commands.primary)),
|
||||
Component.text(bot.commandManager.commands.size()).color(NamedTextColor.NAMES.value(colors.integer)),
|
||||
TranslationsUtil.customTranslations("command.help.trust_level.public", null).color(NamedTextColor.NAMES.value(colors.help.Public)),
|
||||
TranslationsUtil.customTranslations("command.help.trust_level.trusted", null).color(NamedTextColor.NAMES.value(colors.help.trusted)),
|
||||
TranslationsUtil.customTranslations("command.help.trust_level.admin", null).color(NamedTextColor.NAMES.value(colors.help.admin)),
|
||||
TranslationsUtil.customTranslations("command.help.trust_level.owner", null).color(NamedTextColor.NAMES.value(colors.help.owner))
|
||||
);
|
||||
|
||||
Component helpLayout = TranslationsUtil.customTranslations(
|
||||
"command.help.layout",
|
||||
list
|
||||
);
|
||||
|
||||
Component component = Component.empty()
|
||||
.append(helpLayout)
|
||||
.append(Component.join(JoinConfiguration.separator(Component.space()), getCommands(bot)));
|
||||
|
||||
source.sendFeedback(component);
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user