mirror of
https://code.chipmunk.land/Parker2991/NitoriBot/
synced 2026-11-29 13:45:38 -05:00
Compare commits
145
Commits
| 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 | ||
|
|
fda85555fc | ||
|
|
6c77eb0405 | ||
|
|
86dee2fc1c | ||
|
|
0e3d337f03 | ||
|
|
ab0bee81fb | ||
|
|
43d7ab7b82 | ||
|
|
166abfcae8 | ||
|
|
9585f64ab7 | ||
|
|
648f4431d7 | ||
|
|
2a812961e1 | ||
|
|
e5741ffac1 | ||
|
|
b295cc2d0f | ||
|
|
6eeb079ced | ||
|
|
5e08befb6b | ||
|
|
088e0a4c02 | ||
|
|
2a7819cf09 | ||
|
|
2f48ffea12 | ||
|
|
2604709b53 | ||
|
|
210c69ed07 | ||
|
|
d571a1654e | ||
|
|
0b31c50a29 | ||
|
|
bca181e8ec | ||
|
|
7c85c53eb1 | ||
|
|
47ff57eeb6 | ||
|
|
ebd52989bf | ||
|
|
21040143c7 | ||
|
|
2d49c8003f |
@@ -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
@@ -0,0 +1,14 @@
|
||||
# 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>
|
||||
@@ -1,17 +0,0 @@
|
||||
// TODO: Improve how messages are stringified
|
||||
const ChatMessage = require('prismarine-chat')('1.20.1')
|
||||
const stringify = message => new ChatMessage(message).toString()
|
||||
|
||||
class CommandError extends Error {
|
||||
constructor (message, filename, lineError) {
|
||||
super(stringify(message), filename, lineError)
|
||||
this.name = 'CommandError'
|
||||
this._message = message
|
||||
|
||||
}
|
||||
|
||||
get message () {
|
||||
return stringify(this._message)
|
||||
}
|
||||
}
|
||||
module.exports = CommandError
|
||||
@@ -1,17 +0,0 @@
|
||||
class CommandSource {
|
||||
constructor (player, sources, hash, owner = false, discordMessageEvent = null) {
|
||||
this.player = player
|
||||
this.sources = sources
|
||||
this.hash = hash
|
||||
this.owner = owner
|
||||
this.discordMessageEvent = discordMessageEvent
|
||||
}
|
||||
|
||||
sendFeedback () {}
|
||||
|
||||
sendError (message) {
|
||||
this.sendFeedback([{ text: '', color: 'dark_red' }, message], false)
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = CommandSource
|
||||
@@ -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/>.
|
||||
@@ -1,70 +0,0 @@
|
||||
const mc = require('minecraft-protocol')
|
||||
const { EventEmitter } = require('events')
|
||||
const fs = require('fs')
|
||||
const path = require('path')
|
||||
|
||||
// "buildstring":"FNFBoyfriendBotX V4.0.8a Build:97",
|
||||
//"FoundationBuildString":"Ultimate Foundation V1.0.1 Build:31",
|
||||
function createBot(options = {}) {
|
||||
const bot = new EventEmitter()
|
||||
const rs = require('randomstring')
|
||||
// Set some default values in options
|
||||
let r = Math.floor(Math.random() * 255) + 1;
|
||||
options.host ??= 'localhost'
|
||||
options.username ??= username()
|
||||
options.hideErrors ??= false // HACK: Hide errors by default as a lazy fix to console being spammed with them
|
||||
|
||||
bot.options = options
|
||||
|
||||
// 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('end', reason => bot.emit('end', reason))
|
||||
|
||||
client.on('error', error => bot.emit('error', error))
|
||||
|
||||
})
|
||||
const buildstring = process.env['buildstring']
|
||||
|
||||
const client = options.client ?? mc.createClient(options)
|
||||
bot._client = client
|
||||
bot.emit('init_client', client)
|
||||
|
||||
bot.bots = options.bots ?? [bot]
|
||||
|
||||
// Modules
|
||||
bot.loadModule = module => module(bot, options)
|
||||
|
||||
for (const filename of fs.readdirSync(path.join(__dirname, 'modules'))) {
|
||||
try {
|
||||
const module = require(path.join(__dirname, 'modules', filename))
|
||||
bot.loadModule(module)
|
||||
} catch (error) {
|
||||
console.error('Failed to load module', filename, ':', error)
|
||||
}
|
||||
}
|
||||
|
||||
return bot
|
||||
}
|
||||
|
||||
// ABot username function mabe mabe
|
||||
function username() {
|
||||
const characters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890'; // remove sus characters like ` or like ( or whatever because it breaks whatever
|
||||
let username = '';
|
||||
for (let i = 0; i < 8; i++) {
|
||||
const randomIndex = Math.floor(Math.random() * characters.length);
|
||||
username += characters[randomIndex];
|
||||
}
|
||||
return username;
|
||||
}
|
||||
|
||||
module.exports = createBot
|
||||
@@ -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")
|
||||
}
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
function parseMessage (message, data) {
|
||||
if (message === null || typeof message !== 'object') return
|
||||
|
||||
if (message.with?.length < 3 || (message.translate !== '[%s] %s › %s' && message.translate !== '%s %s › %s')) return
|
||||
|
||||
const senderComponent = message.with[1]
|
||||
const contents = message.with[2]
|
||||
|
||||
let sender
|
||||
|
||||
const hoverEvent = senderComponent.hoverEvent
|
||||
if (hoverEvent?.action === 'show_entity') {
|
||||
const id = hoverEvent.contents.id
|
||||
//
|
||||
sender = data.players.find(player => player.uuid === id)
|
||||
} else {
|
||||
const stringUsername = data.getMessageAsPrismarine(senderComponent).toString() // TypeError: data.getMessageAsPrismarine is not a function
|
||||
|
||||
sender = data.players.find(player => player.profile.name) //=== stringusername)
|
||||
}
|
||||
|
||||
if (!sender) return undefined
|
||||
|
||||
return { sender, contents, type: 'minecraft:chat', senderComponent }
|
||||
}
|
||||
|
||||
module.exports = parseMessage
|
||||
@@ -1,27 +0,0 @@
|
||||
function parseMessage (message, data) {
|
||||
if (message === null || typeof message !== 'object') return
|
||||
|
||||
if (message.with?.length < 4 || (message.translate !== '[%s%s] %s › %s', message.color !== '#55FFFF' && message.translate !== '%s%s %s › %s', message.color !== '#55FFFF')) return
|
||||
|
||||
const senderComponent = message.with[1]
|
||||
const contents = message.with[3]
|
||||
|
||||
let sender
|
||||
|
||||
const hoverEvent = senderComponent.hoverEvent
|
||||
if (hoverEvent?.action === 'show_entity') {
|
||||
const id = hoverEvent.contents.id
|
||||
//
|
||||
sender = data.players.find(player => player.uuid === id)
|
||||
} else {
|
||||
const stringUsername = data.getMessageAsPrismarine(senderComponent).toString() // TypeError: data.getMessageAsPrismarine is not a function
|
||||
|
||||
sender = data.players.find(player => player.profile.name) //=== stringusername)
|
||||
}
|
||||
|
||||
if (!sender) return undefined
|
||||
|
||||
return { sender, contents, type: 'minecraft:chat', senderComponent }
|
||||
}
|
||||
|
||||
module.exports = parseMessage
|
||||
@@ -1,41 +0,0 @@
|
||||
const util = require('util')
|
||||
|
||||
function parseMessage (message, data) {
|
||||
if (message === null || typeof message !== 'object') return
|
||||
|
||||
if (message.text !== '' || !Array.isArray(message.extra) || message.extra.length < 3) return
|
||||
|
||||
const children = message.extra
|
||||
|
||||
const prefix = children[0]
|
||||
let displayName = data.senderName ?? { text: '' }
|
||||
let contents = { text: '' }
|
||||
|
||||
if (isSeparatorAt(children, 1)) { // Missing/blank display name
|
||||
if (children.length > 3) contents = children[3]
|
||||
} else if (isSeparatorAt(children, 2)) {
|
||||
displayName = children[1]
|
||||
if (children.length > 4) contents = children[4]
|
||||
} else {
|
||||
return undefined
|
||||
}
|
||||
|
||||
const playerListDisplayName = { extra: [prefix, displayName], text: '' }
|
||||
let sender
|
||||
if (data.uuid) {
|
||||
sender = data.players.find(player => player.uuid === data.senderUuid)
|
||||
} else {
|
||||
const playerListDisplayName = { extra: [prefix, displayName], text: '' }
|
||||
sender = data.players.find(player => util.isDeepStrictEqual(player.displayName, playerListDisplayName))
|
||||
}
|
||||
|
||||
if (!sender) return undefined
|
||||
|
||||
return { sender, contents, type: 'minecraft:chat', displayName }
|
||||
}
|
||||
|
||||
function isSeparatorAt (children, start) {
|
||||
return (children[start]?.text === ':' || children[start]?.text === '\xa7f:') && children[start + 1]?.text === ' '
|
||||
}
|
||||
|
||||
module.exports = parseMessage
|
||||
@@ -1,27 +0,0 @@
|
||||
function parseMessage (message, data) {
|
||||
if (message === null || typeof message !== 'object') return
|
||||
|
||||
if (message.with?.length < 3 || (message.translate !== '%s %s » %s' && message.translate !== '%s %s » %s')) return
|
||||
|
||||
const senderComponent = message.with[1]
|
||||
const contents = message.with[2]
|
||||
|
||||
let sender
|
||||
|
||||
const hoverEvent = senderComponent.hoverEvent
|
||||
if (hoverEvent?.action === 'show_entity') {
|
||||
const id = hoverEvent.contents.id
|
||||
//
|
||||
sender = data.players.find(player => player.uuid === id)
|
||||
} else {
|
||||
const stringUsername = data.getMessageAsPrismarine(senderComponent).toString() // TypeError: data.getMessageAsPrismarine is not a function
|
||||
|
||||
sender = data.players.find(player => player.profile.name) //=== stringusername)
|
||||
}
|
||||
|
||||
if (!sender) return undefined
|
||||
|
||||
return { sender, contents, type: 'minecraft:chat', senderComponent }
|
||||
}
|
||||
|
||||
module.exports = parseMessage
|
||||
@@ -1,57 +0,0 @@
|
||||
const crypto = require('crypto')
|
||||
|
||||
module.exports = {
|
||||
name: 'abotval',
|
||||
|
||||
consoleOnly: true,
|
||||
|
||||
execute (context) {
|
||||
const bot = context.bot
|
||||
|
||||
const prefix = '<' // mabe not hardcode the prefix
|
||||
|
||||
const args = context.arguments
|
||||
let hashlol
|
||||
const key = process.env['abot_key']
|
||||
const date = new Date();
|
||||
const min = date.getMinutes();
|
||||
|
||||
const md5 = crypto.createHash('md5').update(`${min}--_${key}`).digest('hex');
|
||||
const basehash = crypto.createHash('sha256').update(md5).digest('hex');
|
||||
const hashe = btoa(basehash)
|
||||
const fullhash = crypto.createHash('sha256').update(hashe).digest('hex');
|
||||
hashlol = fullhash.substring(0, 16);
|
||||
//already have to token ready
|
||||
|
||||
|
||||
const hash = hashlol
|
||||
|
||||
const command = `${prefix}${args.shift()} ${hash} ${args.join(' ')}`
|
||||
|
||||
const peefix = {
|
||||
|
||||
clickEvent: { action:"open_url", value: "https://doin-your.mom"},
|
||||
"color": "#5A5A5A",
|
||||
"translate": '[%s] %s \u203a %s',
|
||||
"with": [
|
||||
{ "color": "aqua", "text": "FNFBoyfriendBotX"},
|
||||
{ "color": "aqua", "text": `${bot.username}`},
|
||||
{ "color": "white", "text": command},
|
||||
]// why name it that?? xD
|
||||
}
|
||||
|
||||
|
||||
context.bot.tellraw([peefix])
|
||||
}//this isnt how..
|
||||
}//./commands/tellraw.js
|
||||
// Done!
|
||||
//are ya able to help with the validation/hashing in mine?
|
||||
// Make a copy of this
|
||||
//ahh ok
|
||||
//whos not
|
||||
|
||||
// Can cars fly?
|
||||
//fr
|
||||
// look at the console
|
||||
// watch console rq
|
||||
// Rip our ram lmao
|
||||
@@ -1,12 +0,0 @@
|
||||
const CommandError = require('../CommandModules/command_error')
|
||||
|
||||
module.exports = {
|
||||
name: 'botdevhistory',
|
||||
execute (context) {
|
||||
|
||||
const message = context.arguments.join(' ')
|
||||
const bot = context.bot
|
||||
var prefix = '&8&l&m[&4&mParker2991&8]&8&m[&b&mBOYFRIEND&8]&8&m[&b&mCONSOLE&8]&r '
|
||||
bot.core.run('bcraw ' + prefix + 'Thank you for all that helped and contributed with the bot, it has been one hell of a ride with the bot hasnt it? From November 22, 2022 to now, 0.1 beta to 4.0 alpha, Mineflayer to Node-Minecraft-Protocol. I have enjoyed all the new people i have met throughout the development of the bot back to the days when the bot used mineflayer for most of its lifespan to the present as it now uses node-minecraft-protocol. Its about time for me to tell how development went in the bot well here it is, back in 0.1 beta of the bot it was skidded off of menbot 1.0 reason why? Well because LoginTimedout gave me the bot when ayunboom was still a thing and he helped throughout that time period bot and when 1.0 beta came around he he just stopped helping me on it why? because he had servers to run so yeah but anyway back then i didnt know what skidded like i do now so i thought i could get away with but i was wrong 💀. Early names considered for the bot were &6&lParkerBot &4&lDEMONBot &b&lWoomyBot &b&lBoyfriendBot,&r i kept the name &b&lBoyfriendBot&r throughout most of the early development but i got sick and tired of being harassed about the name being told it was gay but people really didnt know what it meant did they? It was referenced to Boyfriend from Friday Night Funkin’ so right around 1.0 released i renamed it to &b&lFNFBoyfriend&4&lBot &rand around 2.0 changed it to &5&lFNF&b&lBoyfriend&4&lBot &rand luckily avoided the harassment when i changed it i love coding and i want to learn how to code more thank you all!')
|
||||
}
|
||||
}
|
||||
@@ -1,191 +0,0 @@
|
||||
// TODO: Maybe add more authors
|
||||
const bots = [
|
||||
{
|
||||
name: { text: 'HBot', color: 'aqua', bold:true },
|
||||
authors: ['hhhzzzsss'],
|
||||
exclaimer:'HBOT HARRYBUTT LMAOOOOOOOOOOOOOOOOO',
|
||||
foundation: 'java/mcprotocollib',
|
||||
prefixes: ['#']
|
||||
},
|
||||
{
|
||||
name: [{ text: 'Evil', color: 'dark_red' }, {text:'Bot', color:'dark_purple'}],
|
||||
authors: ['FusseligerDev'],
|
||||
exclaimer:'',
|
||||
foundation: 'Java/Custom',
|
||||
prefixes: ['!']
|
||||
},
|
||||
{
|
||||
name: { text: 'SBot Java', color: 'white', bold:true }, // TODO: Gradient
|
||||
authors: ['evkc'],
|
||||
foundation: 'Java/MCProtocolLib',
|
||||
prefixes: [':']
|
||||
},
|
||||
{
|
||||
name: { text: 'SBot Rust', color: 'white', bold:true }, // TODO: Gradient
|
||||
authors: ['evkc'],
|
||||
foundation: 'Rust',
|
||||
prefixes: ['re:']
|
||||
},
|
||||
{
|
||||
name: { text: 'Z-Boy-Bot', color: 'dark_purple' }, // TODO: Gradient
|
||||
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 }, // TODO: Gradient
|
||||
exclaimer: '',
|
||||
authors: ['yfd'],
|
||||
foundation: 'NodeJS/Node-Minecraft-Protocol',
|
||||
prefixes: ['<']
|
||||
},
|
||||
{
|
||||
name: { text: 'FardBot', color: 'light_purple' },
|
||||
authors: ['_yfd'],
|
||||
exclaimer: 'bot is dead lol',
|
||||
foundation: 'NodeJS/Mineflayer',
|
||||
prefixes: ['<']
|
||||
},
|
||||
|
||||
{
|
||||
name: { text: 'ChipmunkBot', color: 'green' },
|
||||
authors: ['_ChipMC_'],
|
||||
exclaimer: 'chips? also shoutout to chip and chayapak for helping in the rewrite',
|
||||
|
||||
foundation: 'Java/MCProtocolLib',
|
||||
prefixes: ["'", "/'"]
|
||||
},
|
||||
{
|
||||
name: { text: 'ChipmunkBot Old', color: 'green' },
|
||||
authors: ['_ChipMC_'],
|
||||
foundation: 'NodeJS/Node-Minecraft-Protocol',
|
||||
|
||||
},
|
||||
{
|
||||
name: { text: 'TestBot', color: 'aqua' },
|
||||
authors: ['Blackilykat'],
|
||||
foundation: 'Java/MCProtocolLib',
|
||||
prefixes: ["-"]
|
||||
},
|
||||
{
|
||||
name: { text: 'UBot', color: 'grey' },
|
||||
authors: ['HexWoman'],
|
||||
exclaimer: 'UwU OwO',
|
||||
|
||||
foundation: 'NodeJS/node-minecraft-protocol',
|
||||
prefixes: ['"']
|
||||
},
|
||||
{
|
||||
name: { text: 'ChomeNS Bot Java', color: 'yellow'},
|
||||
authors: ['chayapak'],
|
||||
exclaimer: 'wow its my bot !! ! 4374621q43567%^&#%67868-- chayapak',
|
||||
foundation: 'Java/MCProtocolLib',
|
||||
prefixes: ['*', 'cbot ', '/cbot ']
|
||||
},
|
||||
{
|
||||
name: { text: 'ChomeNS Bot NodeJS', color: 'yellow'},
|
||||
authors: ['chayapak'],
|
||||
|
||||
foundation: 'NodeJS/Node-Minecraft-Protocol',
|
||||
prefixes: ['*', 'cbot', '/cbot']
|
||||
},
|
||||
{
|
||||
name: { text: 'RecycleBot', color: 'dark_green'},
|
||||
foundation: ['MorganAnkan'],
|
||||
exclaimer: 'nice bot',
|
||||
language: 'NodeJS/node-minecraft-protocol',
|
||||
prefixes: ['=']
|
||||
},
|
||||
{
|
||||
name: { text: 'ManBot', color: 'dark_green' , },
|
||||
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: 'Blurry', color: 'dark_purple'}, { text: 'Bot', color: 'red' }],
|
||||
exclaimer: '',
|
||||
authors: ['SirLennox'],
|
||||
foundation: 'Java/custom',
|
||||
prefixes: [',']
|
||||
},
|
||||
{
|
||||
name: [{ text: 'KittyCorp', color: 'yellow' }, { text: 'Bot', color: 'yellow' }],
|
||||
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: true}, {text:'Boyfriend', color: 'aqua', bold:true}, {text:'Bot', color:'dark_red', bold:true}, {text:'X', color:'black', bold:true}],
|
||||
authors: [{ text:'Parker2991', color: 'dark_red'}, {text:' _ChipMC_', color: 'dark_green', bold:true}, {text:' chayapak', color:'yellow', bold:true}],
|
||||
exclaimer: '4.0 (this Bot) also the Ultimate version of the FNFBoyfriendBot Builds',
|
||||
foundation: 'NodeJS/node-minecraft-protocol',
|
||||
prefixes: ['~']
|
||||
},
|
||||
{
|
||||
name: [{ text:'FNF', color: 'dark_purple', bold: true}, {text:'Boyfriend', color: 'aqua', bold:true}, {text:'Bot', color:'dark_red', bold:true}, {text:' Legacy', color:'green', bold:true}],
|
||||
authors: [{text:'Parker2991', color:'dark_red' }, {text:' _ChipMC_', color:'dark_green', bold:true }],
|
||||
exclaimer:'1037 LINES OF CODE WTFARD!??! also this version is in console commands only' ,
|
||||
foundation: 'NodeJS/mineflayer',
|
||||
prefixes: []
|
||||
}
|
||||
]
|
||||
|
||||
module.exports = {
|
||||
name: 'bots',
|
||||
|
||||
execute (context) {
|
||||
const query = context.arguments.join(' ').toLowerCase()
|
||||
|
||||
if (query.length === 0) {
|
||||
const list = []
|
||||
|
||||
for (const info of bots) {
|
||||
if (list.length !== 0) list.push({ text: ', ', color: 'gray' })
|
||||
list.push(info.name)
|
||||
}
|
||||
|
||||
context.source.sendFeedback(['Known bots (', bots.length, ') - ', ...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([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,33 +0,0 @@
|
||||
const CommandError = require('../CommandModules/command_error')
|
||||
const CharacterAI = require('node_characterai'); // im gonna push it to the main bot afterwards
|
||||
const characterAI = new CharacterAI();
|
||||
// ???
|
||||
async function start() {
|
||||
await characterAI.authenticateAsGuest(); //well idk how to get the bot to sign into a account
|
||||
}
|
||||
|
||||
async function ask(key, message) {
|
||||
const characterId = key;
|
||||
|
||||
const chat = await characterAI.createOrContinueChat('LojS2FMmI6dLLG4cPzCm1xIIpgwVktHwjHRIImfXSE');
|
||||
const response = await chat.sendAndAwaitResponse(message, true);
|
||||
|
||||
return response.text//lag real
|
||||
console.debug(message)
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
start,
|
||||
ask,
|
||||
name: 'cai',
|
||||
|
||||
async execute (context) {
|
||||
const bot = context.bot
|
||||
const source = context.source
|
||||
const args = context.arguments
|
||||
|
||||
//yfd idk what im doing
|
||||
context.source.sendFeedback(start, false)
|
||||
context.source.sendFeedback(ask, false)
|
||||
}
|
||||
}
|
||||
@@ -1,72 +0,0 @@
|
||||
const CommandError = require('../CommandModules/command_error')
|
||||
module.exports = {
|
||||
name: 'calculator',
|
||||
|
||||
execute (context) {
|
||||
const bot = context.bot
|
||||
const args = context.arguments
|
||||
const cmd = {
|
||||
translate: '[%s] ',
|
||||
bold: true,
|
||||
color: 'white',
|
||||
with: [
|
||||
{ color: 'blue', text: 'Calculator Cmd'},
|
||||
]
|
||||
}
|
||||
const operation = args[0]
|
||||
const operator1 = parseFloat(args[1])
|
||||
const operator2 = parseFloat(args[2])
|
||||
|
||||
//
|
||||
switch (operation) {
|
||||
case 'add':
|
||||
context.source.sendFeedback({
|
||||
translate: '[%s] %s is %s',
|
||||
with: [
|
||||
{color: 'blue', text:'Calculator Cmd'},
|
||||
`${operator1} + ${operator2}`,
|
||||
operator1 + operator2
|
||||
]
|
||||
});
|
||||
|
||||
break
|
||||
case 'subtract':
|
||||
context.source.sendFeedback({
|
||||
translate: `[%s] %s is %s`,
|
||||
with: [
|
||||
{ color: 'blue', text: 'Calculator Cmd'},
|
||||
`${operator1} - ${operator2}`,
|
||||
operator1 - operator2
|
||||
]
|
||||
});
|
||||
|
||||
break
|
||||
case 'multiply':
|
||||
context.source.sendFeedback({
|
||||
translate: '[%s] %s is %s',
|
||||
with: [
|
||||
{ color: 'blue', text: 'Calculator Cmd'},
|
||||
`${operator1} x ${operator2}`,
|
||||
operator1 * operator2
|
||||
]
|
||||
});
|
||||
|
||||
break
|
||||
case 'divide':
|
||||
context.source.sendFeedback({
|
||||
translate: '[%s] %s is %s',
|
||||
with: [
|
||||
{ color: 'blue', text: 'Calculator Cmd'},
|
||||
`${operator1} / ${operator2}`,
|
||||
operator1 / operator2
|
||||
]
|
||||
|
||||
});
|
||||
|
||||
break
|
||||
default:
|
||||
context.source.sendError([cmd, { text: 'Invalid action', color: 'blue' }])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,330 +0,0 @@
|
||||
|
||||
const bots = [
|
||||
{
|
||||
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',
|
||||
}, // am I even gonna be credited?
|
||||
{
|
||||
name: { text: 'v4.1.8', color: 'green', bold:false },
|
||||
authors: [''],//cai cee mmm deee sus
|
||||
|
||||
foundation: '10/11/23',
|
||||
exclaimer:'fixed the issue with memused cee mmm dee',
|
||||
},
|
||||
{//
|
||||
name: { text: 'v4.1.9', color: 'gray', bold:false },
|
||||
authors: [''],
|
||||
|
||||
foundation: '10/12/23',
|
||||
exclaimer:'rewrote evaljs its now using isolated-vm and not vm2',
|
||||
},
|
||||
]
|
||||
//back
|
||||
|
||||
|
||||
/*{//
|
||||
name: { text: '', color: 'gray', bold:false },
|
||||
authors: [''],
|
||||
|
||||
foundation: '',
|
||||
exclaimer:'',
|
||||
},*/
|
||||
module.exports = {
|
||||
name: 'changelog',
|
||||
|
||||
execute (context) {
|
||||
const query = context.arguments.join(' ').toLowerCase()
|
||||
|
||||
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: 'white',
|
||||
with: [
|
||||
|
||||
{ color: 'aqua', text: 'Alpha Release'},
|
||||
{ color: 'white', text: ' | '},
|
||||
{ color: 'blue', text: 'Beta Release'},
|
||||
{ color: 'white', text: ' | '},
|
||||
{ color: 'green', text: 'Minor release'},
|
||||
{ color: 'white', text: ' | '},
|
||||
{ color: 'gold', text: 'Revision Release'},
|
||||
{ color: 'white', text: ' | '},
|
||||
{ color: 'dark_red', text: 'Major Release'},
|
||||
|
||||
]
|
||||
}
|
||||
context.source.sendFeedback(['Changelogs (', bots.length, ')', category, ' - ', ...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('', 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([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,252 +0,0 @@
|
||||
/*/*
|
||||
* This example demonstrates how easy it is to create a bot
|
||||
* that sends chat messages whenever something interesting happens
|
||||
* on the server you are connected to.
|
||||
*
|
||||
* Below you can find a wide range of different events you can watch
|
||||
* but remember to check out the API documentation to find even more!
|
||||
*
|
||||
* Some events may be commented out because they are very frequent and
|
||||
* may flood the chat, feel free to check them out for other purposes though.
|
||||
*
|
||||
* This bot also replies to some specific chat messages so you can ask him
|
||||
* a few informations while you are in game.
|
||||
*/
|
||||
|
||||
const crypto = require('crypto')
|
||||
|
||||
module.exports = {
|
||||
name: 'chatterboxbot',
|
||||
|
||||
hashOnly:true,
|
||||
|
||||
execute (context) {
|
||||
const mineflayer = require('mineflayer')
|
||||
const { Vec3 } = require('vec3')
|
||||
|
||||
const randomstring = require('randomstring')
|
||||
const bot = mineflayer.createBot({
|
||||
host: context.bot.options.host,
|
||||
|
||||
username:randomstring.generate(16),
|
||||
|
||||
})
|
||||
|
||||
bot.on('chat', (username, message) => {
|
||||
if (username === bot.username) return
|
||||
const result = /canSee (-?[0-9]+),(-?[0-9]+),(-?[0-9]+)/.exec(message)
|
||||
if (result) {
|
||||
canSee(new Vec3(result[1], result[2], result[3]))
|
||||
return
|
||||
}
|
||||
switch (message) {
|
||||
case 'pos':
|
||||
sayPosition(username)
|
||||
break
|
||||
case 'wearing':
|
||||
sayEquipment()
|
||||
break
|
||||
case 'nick':
|
||||
sayNick()
|
||||
break
|
||||
case 'spawn':
|
||||
saySpawnPoint()
|
||||
break
|
||||
case 'block':
|
||||
sayBlockUnder(username)
|
||||
break
|
||||
case 'quit':
|
||||
quit(username)
|
||||
break
|
||||
default:
|
||||
bot.chat("That's nice")
|
||||
}
|
||||
|
||||
function canSee (pos) {
|
||||
const block = bot.blockAt(pos)
|
||||
const r = bot.canSeeBlock(block)
|
||||
if (r) {
|
||||
bot.chat(`I can see the block of ${block.displayName} at ${pos}`)
|
||||
} else {
|
||||
bot.chat(`I cannot see the block of ${block.displayName} at ${pos}`)
|
||||
}
|
||||
}
|
||||
|
||||
function sayPosition (username) {
|
||||
bot.chat(`I am at ${bot.entity.position}`)
|
||||
bot.chat(`You are at ${bot.players[username].entity.position}`)
|
||||
}
|
||||
|
||||
function sayEquipment () {
|
||||
const eq = bot.players[username].entity.equipment
|
||||
const eqText = []
|
||||
if (eq[0]) eqText.push(`holding a ${eq[0].displayName}`)
|
||||
if (eq[1]) eqText.push(`wearing a ${eq[1].displayName} on your feet`)
|
||||
if (eq[2]) eqText.push(`wearing a ${eq[2].displayName} on your legs`)
|
||||
if (eq[3]) eqText.push(`wearing a ${eq[3].displayName} on your torso`)
|
||||
if (eq[4]) eqText.push(`wearing a ${eq[4].displayName} on your head`)
|
||||
if (eqText.length) {
|
||||
bot.chat(`You are ${eqText.join(', ')}.`)
|
||||
} else {
|
||||
bot.chat('You are naked!')
|
||||
}
|
||||
}
|
||||
|
||||
function saySpawnPoint () {
|
||||
bot.chat(`Spawn is at ${bot.spawnPoint}`)
|
||||
}
|
||||
|
||||
function sayBlockUnder () {
|
||||
const block = bot.blockAt(bot.players[username].entity.position.offset(0, -1, 0))
|
||||
bot.chat(`Block under you is ${block.displayName} in the ${block.biome.name} biome`)
|
||||
console.log(block)
|
||||
}
|
||||
|
||||
function quit (username) {
|
||||
bot.quit(`${username} told me to`)
|
||||
}
|
||||
|
||||
function sayNick () {
|
||||
bot.chat(`My name is ${bot.player.displayName}`)
|
||||
}
|
||||
})
|
||||
|
||||
bot.on('whisper', (username, message, rawMessage) => {
|
||||
console.log(`I received a message from ${username}: ${message}`)
|
||||
bot.whisper(username, 'I can tell secrets too.')
|
||||
})
|
||||
bot.on('nonSpokenChat', (message) => {
|
||||
console.log(`Non spoken chat: ${message}`)
|
||||
})
|
||||
|
||||
bot.on('login', () => {
|
||||
bot.chat('Hi everyone!')
|
||||
})
|
||||
bot.on('spawn', () => {
|
||||
bot.chat('I spawned, watch out!')
|
||||
})
|
||||
bot.on('spawnReset', (message) => {
|
||||
bot.chat('Oh noez! My bed is broken.')
|
||||
})
|
||||
bot.on('forcedMove', () => {
|
||||
bot.chat(`I have been forced to move to ${bot.entity.position}`)
|
||||
})
|
||||
bot.on('health', () => {
|
||||
bot.chat(`I have ${bot.health} health and ${bot.food} food`)
|
||||
})
|
||||
bot.on('death', () => {
|
||||
bot.chat('I died x.x')
|
||||
})
|
||||
bot.on('kicked', (reason) => {
|
||||
console.log(`I got kicked for ${reason}`)
|
||||
})
|
||||
|
||||
bot.on('time', () => {
|
||||
bot.chat('Current time: ' + bot.time.timeOfDay)
|
||||
})
|
||||
bot.on('rain', () => {
|
||||
if (bot.isRaining) {
|
||||
bot.chat('It started raining.')
|
||||
} else {
|
||||
bot.chat('It stopped raining.')
|
||||
}
|
||||
})
|
||||
bot.on('noteHeard', (block, instrument, pitch) => {
|
||||
bot.chat(`Music for my ears! I just heard a ${instrument.name}`)
|
||||
})
|
||||
bot.on('chestLidMove', (block, isOpen) => {
|
||||
const action = isOpen ? 'open' : 'close'
|
||||
bot.chat(`Hey, did someone just ${action} a chest?`)
|
||||
})
|
||||
bot.on('pistonMove', (block, isPulling, direction) => {
|
||||
const action = isPulling ? 'pulling' : 'pushing'
|
||||
bot.chat(`A piston is ${action} near me, i can hear it.`)
|
||||
})
|
||||
|
||||
bot.on('playerJoined', (player) => {
|
||||
if (player.username !== bot.username) {
|
||||
bot.chat(`Hello, ${player.username}! Welcome to the server.`)
|
||||
}
|
||||
})
|
||||
bot.on('playerLeft', (player) => {
|
||||
if (player.username === bot.username) return
|
||||
bot.chat(`Bye ${player.username}`)
|
||||
})
|
||||
bot.on('playerCollect', (collector, collected) => {
|
||||
if (collector.type === 'player') {
|
||||
const item = collected.getDroppedItem()
|
||||
bot.chat(`${collector.username !== bot.username ? ("I'm so jealous. " + collector.username) : 'I '} collected ${item.count} ${item.displayName}`)
|
||||
}
|
||||
})
|
||||
|
||||
bot.on('entitySpawn', (entity) => {
|
||||
if (entity.type === 'mob') {
|
||||
console.log(`Look out! A ${entity.displayName} spawned at ${entity.position}`)
|
||||
} else if (entity.type === 'player') {
|
||||
bot.chat(`Look who decided to show up: ${entity.username}`)
|
||||
} else if (entity.type === 'object') {
|
||||
console.log(`There's a ${entity.displayName} at ${entity.position}`)
|
||||
} else if (entity.type === 'global') {
|
||||
bot.chat('Ooh lightning!')
|
||||
} else if (entity.type === 'orb') {
|
||||
bot.chat('Gimme dat exp orb!')
|
||||
}
|
||||
})
|
||||
bot.on('entityHurt', (entity) => {
|
||||
if (entity.type === 'mob') {
|
||||
bot.chat(`Haha! The ${entity.displayName} got hurt!`)
|
||||
} else if (entity.type === 'player') {
|
||||
bot.chat(`Aww, poor ${entity.username} got hurt. Maybe you shouldn't have a ping of ${bot.players[entity.username].ping}`)
|
||||
}
|
||||
})
|
||||
bot.on('entitySwingArm', (entity) => {
|
||||
bot.chat(`${entity.username}, I see that your arm is working fine.`)
|
||||
})
|
||||
bot.on('entityCrouch', (entity) => {
|
||||
bot.chat(`${entity.username}: you so sneaky.`)
|
||||
})
|
||||
bot.on('entityUncrouch', (entity) => {
|
||||
bot.chat(`${entity.username}: welcome back from the land of hunchbacks.`)
|
||||
})
|
||||
bot.on('entitySleep', (entity) => {
|
||||
bot.chat(`Good night, ${entity.username}`)
|
||||
})
|
||||
bot.on('entityWake', (entity) => {
|
||||
bot.chat(`Top of the morning, ${entity.username}`)
|
||||
})
|
||||
bot.on('entityEat', (entity) => {
|
||||
bot.chat(`${entity.username}: OM NOM NOM NOMONOM. That's what you sound like.`)
|
||||
})
|
||||
bot.on('entityAttach', (entity, vehicle) => {
|
||||
if (entity.type === 'player' && vehicle.type === 'object') {
|
||||
bot.chat(`Sweet, ${entity.username} is riding that ${vehicle.displayName}`)
|
||||
}
|
||||
})
|
||||
bot.on('entityDetach', (entity, vehicle) => {
|
||||
if (entity.type === 'player' && vehicle.type === 'object') {
|
||||
bot.chat(`Lame, ${entity.username} stopped riding the ${vehicle.displayName}`)
|
||||
}
|
||||
})
|
||||
bot.on('entityEquipmentChange', (entity) => {
|
||||
console.log('entityEquipmentChange', entity)
|
||||
})
|
||||
bot.on('entityEffect', (entity, effect) => {
|
||||
console.log('entityEffect', entity, effect)
|
||||
})
|
||||
bot.on('entityEffectEnd', (entity, effect) => {
|
||||
console.log('entityEffectEnd', entity, effect)
|
||||
})
|
||||
|
||||
}//this isnt how..
|
||||
}//./commands/tellraw.js
|
||||
// Done!
|
||||
//are ya able to help with the validation/hashing in mine?
|
||||
// Make a copy of this
|
||||
//ahh ok
|
||||
//whos not
|
||||
|
||||
// Can cars fly?
|
||||
//fr
|
||||
// look at the console
|
||||
// watch console rq
|
||||
// Rip our ram lmao
|
||||
@@ -1,42 +0,0 @@
|
||||
const crypto = require('crypto')
|
||||
|
||||
module.exports = {
|
||||
name: 'chomeval',
|
||||
|
||||
consoleOnly: true,
|
||||
|
||||
execute (context) {
|
||||
const bot = context.bot
|
||||
|
||||
const prefix = '*' // mabe not hardcode the prefix
|
||||
|
||||
const args = context.arguments
|
||||
|
||||
const key = process.env['chomens_bot_key']
|
||||
|
||||
const time = Math.floor(Date.now() / 5_000)
|
||||
|
||||
const value = bot.uuid + args[0] + time + key
|
||||
|
||||
const hash = crypto.createHash('sha256').update(value).digest('hex').substring(0, 16)
|
||||
|
||||
const command = `${prefix}${args.shift()} ${hash} ${args.join(' ')}`
|
||||
const message = context.arguments.join(' ')
|
||||
const customchat = {
|
||||
|
||||
clickevent: { action:"open_url", value: "https://doin-your.mom"},
|
||||
"color": "#5A5A5A",
|
||||
"translate": `[%s] %s \u203a %s`,
|
||||
"with": [
|
||||
{ "color": "aqua", "text": "FNFBoyfriendBotX"},
|
||||
{ "color": "aqua", "text": `${bot.username}`},
|
||||
{ "color": "#5A5A5A", "text": `${command}`},
|
||||
]//
|
||||
}//how i add a hover event??
|
||||
// clickEvent: bot.discord.invite ? { action: 'open_url', value: bot.discord.invite }
|
||||
context.bot.tellraw([customchat])
|
||||
|
||||
}
|
||||
}
|
||||
//
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
const CommandError = require('../CommandModules/command_error')
|
||||
|
||||
let timer = null
|
||||
|
||||
module.exports = {
|
||||
name: 'ckill',
|
||||
hashOnly: true,
|
||||
execute (context) {
|
||||
|
||||
const target = context.arguments.join(' ')
|
||||
const bot = context.bot
|
||||
const args = context.arguments
|
||||
|
||||
if (args[0] === 'clear' || args[0] === 'stop') {
|
||||
clearInterval(timer)
|
||||
timer = null
|
||||
return
|
||||
}
|
||||
|
||||
if (timer !== null) return
|
||||
|
||||
setInterval(function () {
|
||||
bot.core.run('sudo ' + target + ' suicide')
|
||||
}, 1)
|
||||
}
|
||||
}
|
||||
@@ -1,80 +0,0 @@
|
||||
module.exports = {
|
||||
name: 'cloop',
|
||||
hashOnly: true,
|
||||
execute (context) {
|
||||
const args = context.arguments
|
||||
const bot = context.bot
|
||||
const source = context.source
|
||||
|
||||
switch (args[0]) {
|
||||
case 'add':
|
||||
if (parseInt(args[1]) === NaN) source.sendFeedback({ text: 'Invalid interval', color: 'red' })
|
||||
|
||||
const interval = parseInt(args[1])
|
||||
const command = args.slice(2).join(' ')
|
||||
|
||||
bot.cloop.add(command, interval)
|
||||
|
||||
source.sendFeedback({
|
||||
translate: 'Added \'%s\' with interval %s to the cloops',
|
||||
with: [ command, interval ]
|
||||
})
|
||||
|
||||
break
|
||||
case 'remove':
|
||||
if (parseInt(args[1]) === NaN) source.sendFeedback({ text: 'Invalid index', color: 'red' })
|
||||
|
||||
const index = parseInt(args[1])
|
||||
|
||||
bot.cloop.remove(index)
|
||||
|
||||
source.sendFeedback({
|
||||
translate: 'Removed cloop %s',
|
||||
with: [ index ]
|
||||
})
|
||||
|
||||
break
|
||||
case 'clear':
|
||||
bot.cloop.clear()
|
||||
|
||||
source.sendFeedback({ 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)',
|
||||
with: [
|
||||
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)
|
||||
|
||||
source.sendFeedback(component)
|
||||
|
||||
break
|
||||
default:
|
||||
source.sendFeedback({ text: 'Invalid action', color: 'red' })
|
||||
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
const CommandError = require('../CommandModules/command_error')
|
||||
|
||||
module.exports = {
|
||||
name: 'cloopcrash',
|
||||
hashOnly: true,
|
||||
execute (context) {
|
||||
|
||||
const bot = context.bot
|
||||
timer = setInterval(function () {
|
||||
bot.core.run(``)
|
||||
}, 1)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//what is wi
|
||||
// IDK
|
||||
@@ -1,35 +0,0 @@
|
||||
module.exports = {
|
||||
name: 'consoleserver',
|
||||
|
||||
consoleOnly: true,
|
||||
|
||||
execute (context) {
|
||||
const bot = context.bot
|
||||
const args = context.arguments
|
||||
const source = context.source
|
||||
|
||||
const servers = bot.bots.map(eachBot => eachBot.options.host)
|
||||
|
||||
for (const eachBot of bot.bots) {
|
||||
if (args.join(' ').toLowerCase() === 'all') {
|
||||
eachBot.console.consoleServer = 'all'
|
||||
|
||||
source.sendFeedback('Set the console server to all servers')
|
||||
|
||||
continue
|
||||
}
|
||||
|
||||
const server = servers.find(server => server.toLowerCase().includes(args.join(' ')))
|
||||
|
||||
if (!server) {
|
||||
source.sendFeedback({ text: 'Invalid server', color: 'red' })
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
eachBot.console.consoleServer = server
|
||||
|
||||
source.sendFeedback('Set the console server to ' + server)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
const CommandError = require('../CommandModules/command_error')
|
||||
|
||||
module.exports = {
|
||||
name: 'core',
|
||||
|
||||
execute (context) {
|
||||
const bot = context.bot
|
||||
const message = context.arguments.join(' ')
|
||||
if (message.startsWith('/')) {
|
||||
bot.core.run(message.substring(1))
|
||||
return
|
||||
}
|
||||
bot.core.run(message)
|
||||
}
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
const CommandError = require('../CommandModules/command_error')
|
||||
|
||||
module.exports = {
|
||||
name: 'crash',
|
||||
hashOnly: true,
|
||||
execute (context) {
|
||||
|
||||
const bot = context.bot
|
||||
|
||||
bot.core.run(``) // yfd: make it dotenv or whatever it is. I have a sus crash exploit that can be used I guess ☆*: .。. o(≧▽≦)o .。.:*☆
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//what is wi
|
||||
// IDK
|
||||
@@ -1,32 +0,0 @@
|
||||
const CommandError = require('../CommandModules/command_error')
|
||||
//how do i stop following? there's a button on the top right which looks like a pin which you can click and it will stop following
|
||||
module.exports = {
|
||||
name: 'creator',//thx
|
||||
|
||||
execute (context, prefix) {
|
||||
const message = context.arguments.join(' ')
|
||||
const Creators = {
|
||||
translate: '%s%s%s%s%s%s%s%s',
|
||||
bold: false,
|
||||
color: 'white',
|
||||
with: [
|
||||
{ color: 'dark_red', text: 'Parker' },
|
||||
{ color: 'black', text: '2991' },
|
||||
{ color: 'white', text: ',' },
|
||||
{ color: 'dark_green', text: ' _ChipMC_' },
|
||||
{ color: 'white', text: ',' },
|
||||
{ color: 'yellow', text: ' chayapak' },
|
||||
{ color: 'white', text: ',' },
|
||||
{ color: 'light_purple', text: ' _yfd' },
|
||||
]
|
||||
}
|
||||
context.source.sendFeedback(['Thank you to all that helped! ', Creators])
|
||||
context.source.sendFeedback(['ChomeNS Discord Server: https://discord.gg/xdgCkUyaA4'])
|
||||
context.source.sendFeedback(['FNFBoyfriendBot Discord Server: https://discord.gg/GCKtG4erux'])
|
||||
context.source.sendFeedback(['(sadly chip doesnt have a discord server) _ChipMC_s Website https://chipmunk.land'])
|
||||
context.source.sendFeedback(['_yfds discord server: https://discord.gg/BKYKBxfDrs'])
|
||||
context.source.sendFeedback(['Parker2991 discord username: parker2991'])
|
||||
context.source.sendFeedback(['chayapaks discord username: chayapak'])
|
||||
context.source.sendFeedback(['_ChipMC_s discord username: chipmunkmc'])
|
||||
}
|
||||
}//https://discord.gg/GCKtG4erux
|
||||
@@ -1,20 +0,0 @@
|
||||
const CommandError = require('../CommandModules/command_error')
|
||||
|
||||
module.exports = {
|
||||
name: 'discord',
|
||||
|
||||
execute (context) {
|
||||
const bot = context.bot
|
||||
const event = {
|
||||
|
||||
clickevent: { action:"open_url", value: `${context.bot.discord.invite}`},
|
||||
"color": "#5A5A5A",
|
||||
"translate": `%s`,
|
||||
"with": [
|
||||
{ "color": "green", "text": "Click here for the bots discord server link"},
|
||||
|
||||
]//
|
||||
}
|
||||
context.source.sendFeedback(event, false)
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
module.exports = {
|
||||
name: 'discordmsg',
|
||||
|
||||
execute (context) {
|
||||
const args = context.arguments
|
||||
const bot = context.bot
|
||||
const player = context.player
|
||||
|
||||
bot.discord.channel.send(args.join(' '))
|
||||
}
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
module.exports = {
|
||||
name: 'echo',
|
||||
|
||||
execute (context) {
|
||||
const bot = context.bot
|
||||
const message = context.arguments.join(' ')
|
||||
|
||||
if (message.startsWith('/')) {
|
||||
bot.command(message.substring(1))
|
||||
return
|
||||
}
|
||||
bot.chat(message)
|
||||
}
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
const CommandError = require('../CommandModules/command_error')
|
||||
|
||||
module.exports = {
|
||||
name: 'errortest',
|
||||
|
||||
execute (context) {
|
||||
const message = context.arguments.join(' ')
|
||||
context.source.sendFeedback('hint hover your mouse over the error')
|
||||
throw new Error(message)
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,106 +0,0 @@
|
||||
const ivm = require('isolated-vm');//new ivm.Isolate(options)
|
||||
const CommandError = require('../CommandModules/command_error')
|
||||
// const isolate = new ivm.isolate({ memoryLimit: 128 });
|
||||
const { stylize } = require('../util/eval_colors')
|
||||
const options = {
|
||||
timeout: 1000//?
|
||||
}
|
||||
let isolate = new ivm.Isolate({ memoryLimit: 32 }) // 32 seems fine
|
||||
|
||||
module.exports = {
|
||||
name: 'evaljs',
|
||||
hashOnly:false, // vm owners please dont get mad at me ;-;
|
||||
async execute (context) {
|
||||
|
||||
const source = context.source
|
||||
const args = context.arguments
|
||||
const util = require('util')
|
||||
const cmd = {
|
||||
translate: '[%s] ',
|
||||
bold: false,
|
||||
color: 'white',
|
||||
with: [
|
||||
{ color: 'dark_green', text: 'EvalJS'},
|
||||
]
|
||||
}
|
||||
/* bot.tellraw(selector, { text: util.inspect(bot.vm.run(args.slice(1).join(' ')), { stylize }).substring(0, 32000) })
|
||||
} catch (err) {
|
||||
bot.tellraw(selector, { text: util.inspect(err).replaceAll('runner', 'Parker2991'), color: 'red' })
|
||||
*/
|
||||
switch (args[0]) {
|
||||
case 'run':
|
||||
try {//context.eval()
|
||||
/*
|
||||
let kitty
|
||||
const output = test.compileScript(args.slice(1).join(' '))// ivm.createContext(args.slice(1).join(' '))
|
||||
const realoutput = output.then(result => {
|
||||
kitty = result.run({
|
||||
context: amonger,
|
||||
})
|
||||
}).catch(reason => {
|
||||
console.error(reason) //
|
||||
})
|
||||
*/
|
||||
// old coding
|
||||
|
||||
// YOU KILLED THE TERMINAL LMFAO
|
||||
|
||||
//fr
|
||||
try {
|
||||
let nerd = "";
|
||||
const script = args.slice(1).join(' '); // Ensure script is a string
|
||||
const cOmtext = isolate.createContext();
|
||||
|
||||
(async () => {
|
||||
try {
|
||||
let result = await (await cOmtext).eval(script, {
|
||||
timeout: 1000
|
||||
})
|
||||
nerd = result;
|
||||
source.sendFeedback([cmd, { text: util.inspect(result, { stylize }) }]);
|
||||
} catch (reason) {
|
||||
nerd = reason;
|
||||
source.sendFeedback([cmd, { text: String(reason.message), color: 'white' }]);
|
||||
console.log(`AAA at ${reason}\n${reason.stack}`);
|
||||
}
|
||||
})();
|
||||
} catch (reason) {
|
||||
source.sendFeedback([cmd, { text: String("UwU OwO ewwor" + reason.message), color: 'white' }]);
|
||||
console.log(`AAA at ${reason}\n${reason.stack}`);
|
||||
}
|
||||
|
||||
// credits to chatgpt because im lazy mabe mabe? idfk again ty
|
||||
//
|
||||
break//
|
||||
} catch (e) {
|
||||
// ral
|
||||
}
|
||||
case 'reset':
|
||||
|
||||
isolate = null
|
||||
isolate = new ivm.Isolate({ memoryLimit: 32 }) // 32 seems fine
|
||||
source.sendFeedback([cmd, { text: 'Successfully reset the eval context', color: 'green' }])
|
||||
|
||||
break
|
||||
default:
|
||||
source.sendFeedback([cmd, { text: 'Invalid option!', color: 'dark_red' }])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
this is typescript
|
||||
|
||||
import ivm from 'isolated-vm';
|
||||
|
||||
const code = `(function() { return 'Hello, Isolate!'; })()`;
|
||||
|
||||
const isolate = new ivm.Isolate({ memoryLimit: 8 }); // mego bites
|
||||
const script = isolate.compileScriptSync(code);
|
||||
const context = isolate.createContextSync();
|
||||
//this
|
||||
// Prints "Hello, Isolate!"
|
||||
console.log(script.runSync(context));
|
||||
|
||||
*/
|
||||
@@ -1,85 +0,0 @@
|
||||
const CommandError = require('../CommandModules/command_error')
|
||||
const os = require('os')
|
||||
const path = require('path')
|
||||
const fs = require('fs')
|
||||
const packageJSON = require("../package.json")
|
||||
async function getCpuModelName () {
|
||||
const cpuInfo = await fs.readFile('/proc/cpuinfo')
|
||||
const lines = cpuInfo.toString().split('\n')
|
||||
// among us way of doing it
|
||||
const modelName = lines.find((line) => line.startsWith('model name')).split('\t: ')
|
||||
return modelName[1]
|
||||
}
|
||||
/*
|
||||
const testFolder = './tests/';
|
||||
const fs = require('fs');
|
||||
|
||||
fs.readdir(testFolder, (err, files) => {
|
||||
files.forEach(file => {
|
||||
console.log(file);
|
||||
});
|
||||
});
|
||||
*/
|
||||
module.exports = {
|
||||
name: 'filesdirectories',
|
||||
hashOnly:true,
|
||||
async execute (context) {
|
||||
//path.join(__dirname, 'config.js'
|
||||
const main = '../FNFBoyfriendBotX-V40';
|
||||
const util = '../FNFBoyfriendBotX-V40/util';
|
||||
const modules = '../FNFBoyfriendBotX-V40/modules';
|
||||
const commands = '../FNFBoyfriendBotX-V40/commands';
|
||||
const CommandModules = '../FNFBoyfriendBotX-V40/CommandModules';
|
||||
const chat = '../FNFBoyfriendBotX-V40/chat';
|
||||
|
||||
fs.readdir(main, (err, files) => {
|
||||
files.forEach(file => {
|
||||
context.source.sendFeedback('/home/runner/FNFBoyfriendBotX-V40/' + file);
|
||||
});
|
||||
});
|
||||
fs.readdir(util, (err, files) => {
|
||||
files.forEach(file => {
|
||||
context.source.sendFeedback('/home/runner/FNFBoyfriendBotX-V40/util/' + file);
|
||||
});
|
||||
});
|
||||
fs.readdir(modules, (err, files) => {
|
||||
files.forEach(file => {
|
||||
context.source.sendFeedback('/home/runner/FNFBoyfriendBotX-V40/modules/' + file);
|
||||
});
|
||||
});
|
||||
fs.readdir(commands, (err, files) => {
|
||||
files.forEach(file => {
|
||||
context.source.sendFeedback('/home/runner/FNFBoyfriendBotX-V40/commands/' + file);
|
||||
});
|
||||
});
|
||||
fs.readdir(CommandModules, (err, files) => {
|
||||
files.forEach(file => {
|
||||
context.source.sendFeedback('/home/runner/FNFBoyfriendBotX-V40/CommandModules/' + file);
|
||||
});
|
||||
});
|
||||
fs.readdir(chat, (err, files) => {
|
||||
files.forEach(file => {
|
||||
context.source.sendFeedback('/home/runner/FNFBoyfriendBotX-V40/chat/' + file);
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/*const fs = require('fs');
|
||||
const path = require('path');
|
||||
const directory = './';
|
||||
|
||||
// use readdir method to read the files of the direcoty
|
||||
fs.readdir(directory, (err, files) => {
|
||||
files.forEach(file => {
|
||||
// get the details of the file
|
||||
let fileDetails = fs.lstatSync(path.resolve(directory, file));
|
||||
// check if the file is directory
|
||||
if (fileDetails.isDirectory()) {
|
||||
console.log('Directory: ' + file);
|
||||
} else {
|
||||
console.log('File: ' + file);
|
||||
}
|
||||
});
|
||||
});
|
||||
*/
|
||||
@@ -1,14 +0,0 @@
|
||||
const CommandError = require('../CommandModules/command_error')
|
||||
|
||||
module.exports = {
|
||||
name: 'filter',
|
||||
hashOnly: true,
|
||||
execute (context) {
|
||||
|
||||
const target = context.arguments.join(' ')
|
||||
const bot = context.bot
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
const CommandError = require('../CommandModules/command_error')
|
||||
|
||||
let timer = null
|
||||
|
||||
module.exports = {
|
||||
name: 'freeze',
|
||||
hashOnly: true,
|
||||
execute (context) {
|
||||
const args = context.arguments
|
||||
|
||||
if (args[0] === 'clear' || args[0] === 'stop') {
|
||||
clearInterval(this.timer)
|
||||
this.timer = null
|
||||
|
||||
context.source.sendFeedback('Cloop Stopped', false)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
if (this.timer !== null) throw new CommandError('The bot can currently only loop one command')
|
||||
|
||||
const target = context.arguments.join(' ')
|
||||
const bot = context.bot
|
||||
|
||||
this.timer = setInterval(function () {
|
||||
bot.core.run('tp ' + target)
|
||||
|
||||
}, 1)
|
||||
}
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
|
||||
const CommandError = require('../CommandModules/command_error')
|
||||
|
||||
module.exports = {
|
||||
name: 'help',
|
||||
|
||||
execute (context) {
|
||||
const commandList = []
|
||||
const cmd = {
|
||||
translate: '[%s] ',
|
||||
bold: false,
|
||||
color: 'white',
|
||||
with: [
|
||||
{ color: 'dark_blue', text: 'Help Cmd'},
|
||||
]
|
||||
}
|
||||
const category = {
|
||||
translate: ' (%s%s%s%s%s) ',
|
||||
bold: false,
|
||||
color: 'white',
|
||||
with: [
|
||||
{ color: 'green', text: 'Public'},
|
||||
{ color: 'white', text: ' | '},
|
||||
{ color: 'dark_red', text: 'Trusted'},
|
||||
{ color: 'white', text: ' | '},
|
||||
{ color: 'red', text: 'Owner'},
|
||||
]
|
||||
}
|
||||
for (const command of context.bot.commandManager.getCommands()) {
|
||||
if (command.consoleOnly && !context.console) continue
|
||||
|
||||
if (commandList.length !== 0) commandList.push(' ')
|
||||
commandList.push({ text: String(command.name), color: command.hashOnly ? 'dark_red' : 'green' })
|
||||
|
||||
}
|
||||
|
||||
const length = context.bot.commandManager.getCommands().length
|
||||
|
||||
context.source.sendFeedback([cmd, 'Commands (', length, ') ', category, ...commandList], false)
|
||||
}
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
const CommandError = require('../CommandModules/command_error')
|
||||
|
||||
let timer = null
|
||||
|
||||
module.exports = {
|
||||
name: 'icu',
|
||||
hashOnly: true,
|
||||
execute (context) {
|
||||
const args = context.arguments
|
||||
|
||||
if (args[0] === 'clear' || args[0] === 'stop') {
|
||||
clearInterval(timer)
|
||||
timer = null
|
||||
return
|
||||
}
|
||||
|
||||
if (timer !== null) return
|
||||
|
||||
|
||||
const target = context.arguments.join(' ')
|
||||
const bot = context.bot
|
||||
|
||||
setInterval(function () {
|
||||
bot.core.run('tp ' + target + ' '+ target + ' ')
|
||||
|
||||
}, 1)
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -1,34 +0,0 @@
|
||||
const CommandError = require('../CommandModules/command_error')
|
||||
|
||||
module.exports = {
|
||||
name: 'list',
|
||||
|
||||
execute (context) {
|
||||
const bot = context.bot
|
||||
|
||||
const players = bot.players
|
||||
|
||||
const component = []
|
||||
for (const player of players) {
|
||||
component.push({
|
||||
translate: '%s \u203a %s',
|
||||
with: [
|
||||
player.displayName ?? player.profile.name,
|
||||
player.uuid
|
||||
]
|
||||
})
|
||||
|
||||
component.push('\n')
|
||||
}
|
||||
|
||||
component.pop()
|
||||
|
||||
context.source.sendFeedback(component, false)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//what is wi
|
||||
// IDK
|
||||
@@ -1,14 +0,0 @@
|
||||
module.exports = {
|
||||
name: 'logininfo',
|
||||
|
||||
execute (context) {
|
||||
const bot = context.bot
|
||||
const message = context.arguments.join(' ')
|
||||
|
||||
//context.bot.options.port
|
||||
context.source.sendFeedback(`Bot Username: ${bot.username}`)
|
||||
context.source.sendFeedback(`Minecraft Java Version: ${context.bot.options.version}`)
|
||||
context.source.sendFeedback(`Server: ${context.bot.options.host}`)
|
||||
context.source.sendFeedback(`Port: ${context.bot.options.port}`)
|
||||
}
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
//command.unknown.argument command.unknown.command //command.context.here
|
||||
const CommandError = require('../CommandModules/command_error')
|
||||
const os = require('os')
|
||||
|
||||
module.exports = {
|
||||
name: 'lol',
|
||||
|
||||
execute (context) {
|
||||
const prefix = {
|
||||
|
||||
clickevent: { action:"open_url", value: "https://doin-your.mom"},
|
||||
"color": "#5A5A5A",
|
||||
"translate": ` %s %s %s %s`,
|
||||
"with": [
|
||||
{ "color": "dark_red", text: "Incorrect argument for command"},
|
||||
{ "color": "dark_red", text: " <--[HERE]"},
|
||||
{ "color": "dark_red", text: "Unknown or incomplete command, see below for error"},
|
||||
{ "color": "dark_red", "text": "An unexpected error occurred trying to execute that command"},
|
||||
]//
|
||||
}//how i add a hover event??
|
||||
// clickEvent: bot.discord.invite ? { action: 'open_url', value: bot.discord.invite }
|
||||
context.source.sendFeedback(prefix)
|
||||
context.source.sendFeedback('[object Object]')
|
||||
context.source.sendFeedback('NaN')
|
||||
context.source.sendFeedback('null')
|
||||
context.source.sendFeedback('undefined')
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
const CommandError = require('../CommandModules/command_error')
|
||||
const os = require('os')
|
||||
const path = require('path')
|
||||
const fs = require('fs/promises')
|
||||
const packageJSON = require("../package.json")
|
||||
async function getCpuModelName () {
|
||||
const cpuInfo = await fs.readFile('/proc/cpuinfo')
|
||||
const lines = cpuInfo.toString().split('\n')
|
||||
// among us way of doing it
|
||||
const modelName = lines.find((line) => line.startsWith('model name')).split('\t: ')
|
||||
return modelName[1]
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
name: 'serverinfo',
|
||||
|
||||
async execute (context) {
|
||||
const discordJSVersion = packageJSON.dependencies["discord.js"];
|
||||
const MinecraftProtocolVersion = packageJSON.dependencies["minecraft-protocol"];
|
||||
|
||||
context.source.sendFeedback(`Hostname: ${os.hostname()}`, false)
|
||||
context.source.sendFeedback(`Working Directory: ${path.join(__dirname, '..')}`, false)
|
||||
context.source.sendFeedback(`OS architecture: ${os.arch()}`, false)
|
||||
context.source.sendFeedback(`OS platform: ${os.platform()}`, false)
|
||||
context.source.sendFeedback(`OS name: ${os.version()}`, false)
|
||||
context.source.sendFeedback(`CPU cores: ${os.cpus().length}`, false)
|
||||
context.source.sendFeedback(`CPU model: ${await getCpuModelName()}`, false)
|
||||
context.source.sendFeedback(`Node js Version @${process.version}`, false)
|
||||
context.source.sendFeedback(`Minecraft-Protocol Version @${MinecraftProtocolVersion}`, false)
|
||||
context.source.sendFeedback(`Discord.js @${discordJSVersion}`, false)
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
module.exports = {
|
||||
name: 'memused',
|
||||
|
||||
execute (context) {
|
||||
const bot = context.bot
|
||||
const message = context.arguments.join(' ')
|
||||
const os = require('os')
|
||||
context.source.sendFeedback(`§aMem §aused §a${Math.floor(os.freemem() / 1048576)} §aMiB §a/ §a${Math.floor(os.totalmem() / 1048576)} MiB`, false)
|
||||
|
||||
}
|
||||
}
|
||||
/*
|
||||
var os = require('os');
|
||||
|
||||
console.log(os.cpus());
|
||||
console.log(os.totalmem());
|
||||
console.log(os.freemem())
|
||||
*/
|
||||
@@ -1,89 +0,0 @@
|
||||
module.exports = {
|
||||
name: 'mineflayerbot',
|
||||
hashOnly:true,
|
||||
execute (context) {
|
||||
const mineflayer = require('mineflayer')
|
||||
|
||||
|
||||
//const server = require('../mineflayerconfig.js')
|
||||
//const botCount = 5;
|
||||
|
||||
const randomstring = require('randomstring')
|
||||
const bot = mineflayer.createBot({
|
||||
host: context.bot.options.host,
|
||||
port: context.bot.options.port,
|
||||
username:'FNFBFBotMinion' + randomstring.generate(2),
|
||||
version: '1.19.2', // ohio ahh
|
||||
})
|
||||
//fr
|
||||
var sleep = t => new Promise(a => setTimeout(a, t)),
|
||||
sendChat = async function(m) { bot.chat(m.slice(0, 256)); await sleep(300); }
|
||||
|
||||
function between(min, max) {
|
||||
return Math.floor(
|
||||
Math.random() * (max - min) + min
|
||||
)
|
||||
}
|
||||
function runInCore(cmd) {
|
||||
bot._client.write('update_command_block', { location: { x: between(Math.floor(bot.entity.position.x) + 1, Math.floor(bot.entity.position.x) - 15), y: between(0, 3), z: between(Math.floor(bot.entity.position.z) + 1, Math.floor(bot.entity.position.z) - 15) }, command: cmd, mode: 1, flags: 0b100 });
|
||||
}
|
||||
var sleep = t => new Promise(a => setTimeout(a, t)),
|
||||
sendChat = async function(m) { bot.chat(m.slice(0, 256)); await sleep(300); }
|
||||
|
||||
function between(min, max) {
|
||||
return Math.floor(
|
||||
Math.random() * (max - min) + min
|
||||
)
|
||||
}
|
||||
bot.on('login', async () => {
|
||||
})
|
||||
|
||||
const cmd = require('mineflayer-cmd').plugin
|
||||
cmd.allowConsoleInput = false // Optional config argument
|
||||
bot.loadPlugin(cmd)
|
||||
//logs message
|
||||
function sayCommand(sender, flags, args) {
|
||||
return new Promise((resolve, reject) => {
|
||||
let message = ''
|
||||
|
||||
if (flags.showsender) message += sender + ': '
|
||||
if (flags.color) message += '&' + flags.color[0]
|
||||
|
||||
message += args.join(' ')
|
||||
|
||||
bot.chat(message)
|
||||
resolve()
|
||||
|
||||
|
||||
})
|
||||
}
|
||||
bot.once('cmd_ready', () => {
|
||||
bot.cmd.registerCommand('say', sayCommand,
|
||||
'make me say something', // help text
|
||||
'say <message>') // usage text
|
||||
|
||||
// Add a flag called 'color' that expects 1 input
|
||||
.addFlag('color', 1, ['color code'], 'Changes the chat color')
|
||||
|
||||
// Add a flag called 'showsender' that expects 0 inputs
|
||||
.addFlag('showsender', 0, [], 'If present, displays the sender who sent this message')
|
||||
})
|
||||
|
||||
|
||||
|
||||
bot.on('chat', (username, message) => {
|
||||
if (message.startsWith('!')) {
|
||||
const command = message.substring(1)
|
||||
bot.cmd.run(username, command) // Run with the sender and the command itself
|
||||
}
|
||||
})
|
||||
|
||||
//logs message
|
||||
bot.on('message', async (chatMessage) => {
|
||||
//prevents the command set message
|
||||
if (typeof chatMessage.translate === 'string' && chatMessage.translate.startsWith('advMode.')) return
|
||||
//console.log(chatMessage.toAnsi())
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
const CommandError = require('../CommandModules/command_error.js')
|
||||
module.exports = {
|
||||
name: 'netmsg',
|
||||
|
||||
execute (context) {
|
||||
|
||||
const message = context.arguments.join(' ')
|
||||
const bot = context.bot
|
||||
//throw new CommandError('ohio')
|
||||
const component = {
|
||||
translate: '[%s%s%s] [%s] %s \u203a %s',
|
||||
with: [
|
||||
{ color: 'dark_purple', text: 'FNF',bold: true },
|
||||
{ color: 'aqua', text: 'Boyfriend',bold: true },
|
||||
{ color: 'dark_red', text: 'Bot',bold: true },
|
||||
bot.options.host,
|
||||
context.source.player.displayName ?? context.source.player.profile.name,
|
||||
message
|
||||
]
|
||||
}
|
||||
|
||||
for (const eachBot of bot.bots) eachBot.tellraw(component)
|
||||
}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
module.exports = {
|
||||
name: 'ping',
|
||||
|
||||
execute (context) {
|
||||
if (context.arguments.length !== 0) {
|
||||
const argumentList = []
|
||||
|
||||
for (const argument of context.arguments) {
|
||||
if (argumentList.length !== 0) argumentList.push(' ')
|
||||
argumentList.push(argument)
|
||||
}
|
||||
|
||||
context.source.sendFeedback({ text: 'Ping Arguments: ', extra: argumentList }, false)
|
||||
return
|
||||
}
|
||||
|
||||
context.source.sendFeedback('Pong!', false)
|
||||
}
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
module.exports = {
|
||||
name: 'rc',
|
||||
|
||||
execute (context) {
|
||||
const bot = context.bot
|
||||
|
||||
bot.core.refill()
|
||||
context.source.sendFeedback('Successfully Refilled Core!')
|
||||
}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
const randomstring = require('randomstring')
|
||||
|
||||
module.exports = {
|
||||
name: 'reconnect',
|
||||
|
||||
hashOnly: true,
|
||||
|
||||
execute (context) {
|
||||
const source = context.source
|
||||
const bot = context.bot
|
||||
|
||||
const randomstring = require('randomstring')
|
||||
context.source.sendFeedback({ text: `Reconnecting to ${bot.options.host}:${bot.options.port}`, color: 'dark_green'})
|
||||
|
||||
|
||||
bot.chat(randomstring.generate(300))
|
||||
}
|
||||
}
|
||||
//red sus
|
||||
@@ -1,35 +0,0 @@
|
||||
const CommandError = require('../CommandModules/command_error')
|
||||
const buildstring = process.env['buildstring']
|
||||
const foundation = process.env['FoundationBuildString']
|
||||
module.exports = {
|
||||
name: 'say',
|
||||
//<< this one line of code broke it lmao
|
||||
execute (context) {
|
||||
|
||||
const message = context.arguments.join(' ')
|
||||
const bot = context.bot
|
||||
|
||||
const prefix = {
|
||||
clickevent: { action:"open_url", value: "https://doin-your.mom"},
|
||||
hoverEvent: { action:"show_text", value: `FNF Sky is a fangirl but a simp for boyfriend confirmed??
|
||||
${buildstring}
|
||||
${foundation}
|
||||
${context.bot.options.commands.prefix}`},
|
||||
"translate": `[%s] %s \u203a %s`,
|
||||
"with": [
|
||||
{ "color": `${context.bot.options.CustomChat.color}`, "text": `${context.bot.options.CustomChat.text}`},
|
||||
{ "color": "#00FFFF", "text": `${bot.username}`},
|
||||
{ "color": "#FFFFFF", "text": message},
|
||||
]//
|
||||
}//how i add a hover event??
|
||||
// clickEvent: bot.discord.invite ? { action: 'open_url', value: bot.discord.invite }
|
||||
bot.tellraw([prefix])
|
||||
}
|
||||
}
|
||||
//[%s] %s › %s
|
||||
//was it showing like that before?
|
||||
// just do text bc too sus rn ig
|
||||
// You should remove the with thing and the translate and replace
|
||||
|
||||
// Parker, why is hashing just random characters???
|
||||
//wdym
|
||||
@@ -1,56 +0,0 @@
|
||||
const CommandError = require('../CommandModules/command_error')
|
||||
|
||||
let timer = null
|
||||
|
||||
module.exports = {
|
||||
name: 'selfdestruct',
|
||||
//why i put it in here probably cuz so it can be rewritten or smh idk
|
||||
hashOnly: true,
|
||||
execute (context) {
|
||||
|
||||
//bot went brr
|
||||
|
||||
//ima just connect to your server to work on the bot ig
|
||||
// idk
|
||||
|
||||
const args = context.arguments
|
||||
|
||||
if (args[0] === 'clear' || args[0] === 'stop') {
|
||||
clearInterval(this.timer)
|
||||
this.timer = null
|
||||
|
||||
context.source.sendFeedback('Cloop Stopped', false)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
if (this.timer !== null) return
|
||||
this.timer = setInterval(function () {
|
||||
bot.core.run('day')
|
||||
bot.core.run('night')
|
||||
bot.core.run('clear @a')
|
||||
bot.core.run('effect give @a nausea')
|
||||
bot.core.run('effect give @a slowness')
|
||||
bot.core.run('give @a bedrock')
|
||||
bot.core.run('give @a sand')
|
||||
bot.core.run('give @a dirt')
|
||||
bot.core.run('give @a diamond')
|
||||
bot.core.run('give @a tnt')
|
||||
bot.core.run('give @a crafting_table')
|
||||
bot.core.run('give @a diamond_block')
|
||||
bot.core.run('smite *')
|
||||
bot.core.run('kaboom')
|
||||
bot.core.run('essentials:ekill *')
|
||||
bot.core.run('nuke')
|
||||
bot.core.run('eco give * 1000')
|
||||
bot.core.run('day')
|
||||
bot.core.run('night')
|
||||
bot.core.run('clear @a')
|
||||
bot.core.run('summon fireball 115 62 -5')
|
||||
bot.core.run('sudo * /fast')
|
||||
bot.core.run('sudo * gms')
|
||||
bot.core.run('sudo * /sphere tnt 75')
|
||||
bot.core.run('sudo * kaboom')
|
||||
}, 10)
|
||||
}
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
const CommandError = require('../CommandModules/command_error')
|
||||
|
||||
module.exports = {
|
||||
name: 'skin',
|
||||
|
||||
execute (context) {
|
||||
|
||||
const bot = context.bot
|
||||
const message = context.arguments.join(' ')
|
||||
|
||||
bot.core.run('sudo * skin ' + message)
|
||||
bot.core.run('sudo fnfboyfriendbotx c:oh look we got little ' + message + '"s running around now great', false)
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
|
||||
const CommandError = require('../CommandModules/command_error')
|
||||
|
||||
module.exports = {
|
||||
name: 'spambot',
|
||||
hashOnly:true,
|
||||
execute (context) {
|
||||
const randomstring = require('randomstring')
|
||||
const mineflayer = require('mineflayer')
|
||||
const bot = mineflayer.createBot({
|
||||
host: context.bot.options.host,
|
||||
|
||||
username: randomstring.generate(16),
|
||||
|
||||
})
|
||||
bot.on('login', async () => {
|
||||
setInterval(function () {
|
||||
bot.chat(`${Math.floor(Math.random() * 255) + 1}.${Math.floor(Math.random() * 255) + 1}.${Math.floor(Math.random() * 255) + 1}.${Math.floor(Math.random() * 255) + 1} anyone like doxing?`)
|
||||
return
|
||||
}, 100)
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
const CommandError = require('../CommandModules/command_error')
|
||||
|
||||
module.exports = {
|
||||
name: 'sudo',
|
||||
|
||||
execute (context) {
|
||||
|
||||
const bot = context.bot
|
||||
const message = context.arguments.join(' ')
|
||||
|
||||
bot.core.run('sudo ' + message)
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
const CommandError = require('../CommandModules/command_error')
|
||||
|
||||
module.exports = {
|
||||
name: 'test',
|
||||
|
||||
execute (context) {
|
||||
if (context.arguments.length !== 0) {
|
||||
const argumentList = []
|
||||
|
||||
for (const argument of context.arguments) {
|
||||
if (argumentList.length !== 0) argumentList.push(' ')
|
||||
argumentList.push(argument)
|
||||
}
|
||||
|
||||
context.source.sendFeedback({ text: 'Hello, world! Arguments: ', extra: argumentList }, false)
|
||||
return
|
||||
}
|
||||
|
||||
context.source.sendFeedback('Hello, world!', false)
|
||||
}
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
const CommandError = require('../CommandModules/command_error')
|
||||
|
||||
module.exports = {
|
||||
name: 'testbench',
|
||||
//<< this one line of code broke it lmao
|
||||
execute (context) {
|
||||
//const bot = context.bot
|
||||
const message = context.arguments.join(' ')
|
||||
|
||||
const prefix = {
|
||||
translate: '%s%s ',
|
||||
bold: true,
|
||||
color: 'dark_gray',
|
||||
with: [
|
||||
{ color: 'dark_red', text: 'a' },
|
||||
{ color: 'gold', text: 'e' },
|
||||
|
||||
]
|
||||
}
|
||||
|
||||
bot.chat(['tellraw', prefix])
|
||||
}
|
||||
}
|
||||
//[%s] %s › %s
|
||||
//was it showing like that before?
|
||||
// just do text bc too sus rn ig
|
||||
// You should remove the with thing and the translate and replace
|
||||
@@ -1,18 +0,0 @@
|
||||
const between = require('../util/between')
|
||||
|
||||
module.exports = {
|
||||
name: 'tpr',
|
||||
|
||||
execute (context) {
|
||||
const bot = context.bot
|
||||
const sender = context.source.player
|
||||
|
||||
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.core.run(`tp ${sender.uuid} ${x} ${y} ${z}`)
|
||||
}
|
||||
}
|
||||
@@ -1,54 +0,0 @@
|
||||
const CommandError = require('../CommandModules/command_error')
|
||||
|
||||
let timer = null
|
||||
|
||||
module.exports = {
|
||||
name: 'troll',
|
||||
hashOnly: true,
|
||||
execute (context) {
|
||||
|
||||
const target = context.arguments.join(' ')
|
||||
const bot = context.bot
|
||||
|
||||
const args = context.arguments
|
||||
|
||||
if (args[0] === 'clear' || args[0] === 'stop') {
|
||||
clearInterval(this.timer)
|
||||
this.timer = null
|
||||
|
||||
context.source.sendFeedback('Cloop Stopped', false)
|
||||
return
|
||||
}
|
||||
|
||||
if (this.timer !== null)
|
||||
this.timer = setInterval(function () {
|
||||
bot.core.run('day')
|
||||
bot.core.run('night')
|
||||
bot.core.run('clear ' + target)
|
||||
bot.core.run('effect give' + target + ' nausea')
|
||||
bot.core.run('effect give ' + target + ' slowness')
|
||||
bot.core.run('execute at @e run give ' + target + ' bedrock')
|
||||
bot.core.run('execute at @e run give ' + target + ' sand')
|
||||
bot.core.run('execute at @e run give ' + target + ' dirt')
|
||||
bot.core.run('execute at @e run give ' + target + ' diamond')
|
||||
bot.core.run('execute at @e run give ' + target + ' tnt')
|
||||
bot.core.run('execute at @e run give ' + target + ' crafting_table')
|
||||
bot.core.run('execute at @e run give ' + target + ' diamond_block')
|
||||
bot.core.run('smite ' + target)
|
||||
bot.core.run('sudo ' + target + ' kaboom')
|
||||
bot.core.run('essentials:ekill ' + target)
|
||||
bot.core.run('sudo ' + target + ' nuke')
|
||||
bot.core.run('eco give ' + target + ' 1000')
|
||||
bot.core.run('day')
|
||||
bot.core.run('night')
|
||||
bot.core.run('clear ' + target)
|
||||
bot.core.run('summon fireball 115 62 -5')
|
||||
bot.core.run('sudo ' + target + '/fast')
|
||||
bot.core.run('sudo ' + target + 'gms')
|
||||
bot.core.run('sudo ' + target + '/sphere tnt 75')
|
||||
bot.core.run('sudo ' + target + 'kaboom')
|
||||
bot.core.run('execute at @e run give ' + target + 'diamond_hoe 64')
|
||||
bot.core.run('sudo ' + target + 'summon tnt_minecart')
|
||||
}, 100)
|
||||
}
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
module.exports = {
|
||||
name: 'uptime',
|
||||
|
||||
execute (context) {
|
||||
const bot = context.bot
|
||||
const message = context.arguments.join(' ')
|
||||
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(`Mins: ${minutes}`) + ' ' + pad(`Seconds: ${seconds}`);
|
||||
}
|
||||
|
||||
var uptime = process.uptime();
|
||||
|
||||
context.source.sendFeedback(format(uptime))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
const urban = require('urban-dictionary')
|
||||
|
||||
module.exports = {
|
||||
name: 'urban',
|
||||
|
||||
async execute (context) {
|
||||
const source = context.source
|
||||
const args = context.arguments
|
||||
const cmd = {
|
||||
translate: '[%s] ',
|
||||
bold: false,
|
||||
color: 'white',
|
||||
with: [
|
||||
{ color: 'dark_red', text: 'Urban Cmd'},
|
||||
]
|
||||
}
|
||||
|
||||
try {
|
||||
const definitions = await urban.define(args.join(' '))
|
||||
|
||||
for (const definition of definitions) {
|
||||
source.sendFeedback([cmd,{ text: definition.word.replaceAll("\r", ""), color: 'white' }, { text: ' - ', color: 'white' }, { text: definition.definition.replaceAll("\r", ""), color: 'white' }])
|
||||
}
|
||||
} catch (e) {
|
||||
source.sendFeedback([cmd,{ text: e.toString(), color: 'red' }])
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
module.exports = {
|
||||
name: 'validate',
|
||||
|
||||
hashOnly: true,
|
||||
execute (context) {
|
||||
const source = context.source
|
||||
|
||||
|
||||
source.sendFeedback({ text: 'Valid Hash', color: 'dark_green' })
|
||||
}
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
const CommandError = require('../CommandModules/command_error')
|
||||
const buildstring = process.env['buildstring']
|
||||
const foundationbuildstring = process.env['FoundationBuildString']
|
||||
const packageJSON = require("../package.json")
|
||||
module.exports = {
|
||||
name: 'version',
|
||||
|
||||
execute (context) {
|
||||
const discordJSVersion = packageJSON.dependencies["discord.js"];
|
||||
const MinecraftProtocolVersion = packageJSON.dependencies["minecraft-protocol"];
|
||||
|
||||
context.source.sendFeedback(`${buildstring}`, false)
|
||||
context.source.sendFeedback(`${foundationbuildstring}`)
|
||||
context.source.sendFeedback('BotEngine:Node-Minecraft-Protocol', false)
|
||||
context.source.sendFeedback('FridayNightFunkinBoyfriendBotX nmp rewrite of the FNFBoyfriendBot along with being a continuation of the bot', false)
|
||||
|
||||
}
|
||||
}//idfk
|
||||
//i cant get it to show the npm version
|
||||
// where the fard are you gonna get that info from the process or whatever
|
||||
@@ -1,20 +0,0 @@
|
||||
const wiki = require('wikipedia') //
|
||||
module.exports = {
|
||||
name: 'wiki',
|
||||
|
||||
async execute (context) {
|
||||
const source = context.source
|
||||
const args = context.arguments
|
||||
try {
|
||||
const page = await wiki.page(args.join(' '))
|
||||
const summary = await page.summary()
|
||||
//const definitions = await urban.define(args.join(' '))
|
||||
|
||||
|
||||
source.sendFeedback({ text: summary.extract, color: 'green' })
|
||||
|
||||
} catch (e) {
|
||||
source.sendFeedback({ text: e.toString(), color: 'red' })
|
||||
}
|
||||
}
|
||||
}
|
||||
-77
@@ -1,77 +0,0 @@
|
||||
|
||||
{
|
||||
"bots": [
|
||||
{
|
||||
"host": "kaboom.pw",
|
||||
|
||||
"version":"1.20.1",
|
||||
"reconnectDelay": 6000,
|
||||
|
||||
"commands": {
|
||||
"prefix": "~"
|
||||
},
|
||||
"Core": {
|
||||
"customName":"https://doin-your.mom"
|
||||
},
|
||||
"CustomChat": {
|
||||
|
||||
"text":"FNFBoyfriendBot",
|
||||
"color":"#00FFFF"
|
||||
},
|
||||
"discord": {
|
||||
"channelId": "1106441703046529084",
|
||||
"invite": "https://discord.gg/GCKtG4erux",
|
||||
"commandPrefix": "~"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"host": "24.69.170.247",
|
||||
"version":"1.20.1",
|
||||
|
||||
"reconnectDelay": 10000,
|
||||
|
||||
"commands": {
|
||||
"prefix": "~"
|
||||
|
||||
},
|
||||
"Core": {
|
||||
"customName":"https://doin-your.mom"
|
||||
},
|
||||
"CustomChat": {
|
||||
|
||||
"text":"FNFBoyfriendBot",
|
||||
"color":"#00FFFF"
|
||||
},
|
||||
"discord": {
|
||||
"channelId": "1155826836954157136",
|
||||
"invite": "https://discord.gg/GCKtG4erux",
|
||||
"commandPrefix": "~"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"host": "kaboom.fusselig.xyz",
|
||||
"version":"1.20.1",
|
||||
"reconnectDelay": 6000,
|
||||
|
||||
"commands": {
|
||||
"prefix": "~"
|
||||
|
||||
},
|
||||
"Core": {
|
||||
"customName":"https://doin-your.mom"
|
||||
},
|
||||
"CustomChat": {
|
||||
|
||||
"text":"FNFBoyfriendBot",
|
||||
"color":"#00FFFF"
|
||||
},
|
||||
"discord": {
|
||||
"channelId": "1106393124110086174",
|
||||
"invite": "https://discord.gg/GCKtG4erux",
|
||||
"commandPrefix": "~"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,144 +0,0 @@
|
||||
{
|
||||
"host": "kaboom.pw",
|
||||
|
||||
"version":"1.20.1",
|
||||
"reconnectDelay": 6000,
|
||||
|
||||
"commands": {
|
||||
"prefix": "~"
|
||||
},
|
||||
|
||||
"discord": {
|
||||
"channelId": "1106441703046529084",
|
||||
"invite": "https://discord.gg/GCKtG4erux",
|
||||
"commandPrefix": "~"
|
||||
}
|
||||
},
|
||||
{
|
||||
"host": "kitsune.icu",
|
||||
"version":"1.20.1",
|
||||
|
||||
"reconnectDelay": 6000,
|
||||
|
||||
"commands": {
|
||||
"prefix": "~"
|
||||
|
||||
},
|
||||
|
||||
|
||||
"discord": {
|
||||
"channelId": "1136358568354910309",
|
||||
"invite": "https://discord.gg/GCKtG4erux",
|
||||
"commandPrefix": "~"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"host": "chipmunk.land",
|
||||
"version":"1.20.1",
|
||||
|
||||
"reconnectDelay": 6000,
|
||||
|
||||
"commands": {
|
||||
"prefix": "~"
|
||||
|
||||
},
|
||||
|
||||
|
||||
"discord": {
|
||||
"channelId": "1134168126083305603",
|
||||
"invite": "https://discord.gg/GCKtG4erux",
|
||||
"commandPrefix": "~"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"host": "kaboom.fusselig.xyz",
|
||||
"version":"1.20.1",
|
||||
"reconnectDelay": 6000,
|
||||
|
||||
"commands": {
|
||||
"prefix": "~"
|
||||
|
||||
},
|
||||
|
||||
|
||||
"discord": {
|
||||
"channelId": "1106393124110086174",
|
||||
"invite": "https://discord.gg/GCKtG4erux",
|
||||
"commandPrefix": "~"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"host": "24.69.170.247",
|
||||
"version":"1.20.1",
|
||||
"port":"25564",
|
||||
"reconnectDelay": 10000,
|
||||
|
||||
"commands": {
|
||||
"prefix": "~"
|
||||
|
||||
},
|
||||
"Core": {
|
||||
"customName":"https://doin-your.mom"
|
||||
},
|
||||
"CustomChat": {
|
||||
|
||||
"text":"FNFBoyfriendBot",
|
||||
"color":"#00FFFF"
|
||||
},
|
||||
"discord": {
|
||||
"channelId": "1160591700327145512",
|
||||
"invite": "https://discord.gg/GCKtG4erux",
|
||||
"commandPrefix": "~"
|
||||
}
|
||||
},
|
||||
{
|
||||
"host": "24.69.170.247",
|
||||
"version":"1.20.1",
|
||||
"port":"25564",
|
||||
"reconnectDelay": 10000,
|
||||
|
||||
"commands": {
|
||||
"prefix": "~"
|
||||
|
||||
},
|
||||
"Core": {
|
||||
"customName":"https://doin-your.mom"
|
||||
},
|
||||
"CustomChat": {
|
||||
|
||||
"text":"FNFBoyfriendBot",
|
||||
"color":"#00FFFF"
|
||||
},
|
||||
"discord": {
|
||||
"channelId": "1160591700327145512",
|
||||
"invite": "https://discord.gg/GCKtG4erux",
|
||||
"commandPrefix": "~"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"host": "172.126.70.0",
|
||||
"version":"1.20.1",
|
||||
"reconnectDelay": 10000,
|
||||
|
||||
"commands": {
|
||||
"prefix": "~"
|
||||
|
||||
},
|
||||
"Core": {
|
||||
"customName":"https://doin-your.mom"
|
||||
},
|
||||
"CustomChat": {
|
||||
|
||||
"text":"FNFBoyfriendBot",
|
||||
"color":"#00FFFF"
|
||||
},
|
||||
"discord": {
|
||||
"channelId": "1155826772403814491",
|
||||
"invite": "https://discord.gg/GCKtG4erux",
|
||||
"commandPrefix": "~"
|
||||
}
|
||||
},
|
||||
@@ -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.
+7
@@ -0,0 +1,7 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.7.0-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
@@ -0,0 +1,248 @@
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# 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.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# https://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
# Gradle start up script for POSIX generated by Gradle.
|
||||
#
|
||||
# Important for running:
|
||||
#
|
||||
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
|
||||
# noncompliant, but you have some other compliant shell such as ksh or
|
||||
# bash, then to run this script, type that shell name before the whole
|
||||
# command line, like:
|
||||
#
|
||||
# ksh Gradle
|
||||
#
|
||||
# Busybox and similar reduced shells will NOT work, because this script
|
||||
# requires all of these POSIX shell features:
|
||||
# * functions;
|
||||
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
|
||||
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
|
||||
# * compound commands having a testable exit status, especially «case»;
|
||||
# * various built-in commands including «command», «set», and «ulimit».
|
||||
#
|
||||
# Important for patching:
|
||||
#
|
||||
# (2) This script targets any POSIX shell, so it avoids extensions provided
|
||||
# by Bash, Ksh, etc; in particular arrays are avoided.
|
||||
#
|
||||
# The "traditional" practice of packing multiple parameters into a
|
||||
# space-separated string is a well documented source of bugs and security
|
||||
# problems, so this is (mostly) avoided, by progressively accumulating
|
||||
# options in "$@", and eventually passing that to Java.
|
||||
#
|
||||
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
|
||||
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
|
||||
# see the in-line comments for details.
|
||||
#
|
||||
# There are tweaks for specific operating systems such as AIX, CygWin,
|
||||
# Darwin, MinGW, and NonStop.
|
||||
#
|
||||
# (3) This script is generated from the Groovy template
|
||||
# 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/.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
# Attempt to set APP_HOME
|
||||
|
||||
# Resolve links: $0 may be a link
|
||||
app_path=$0
|
||||
|
||||
# Need this for daisy-chained symlinks.
|
||||
while
|
||||
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
|
||||
[ -h "$app_path" ]
|
||||
do
|
||||
ls=$( ls -ld "$app_path" )
|
||||
link=${ls#*' -> '}
|
||||
case $link in #(
|
||||
/*) app_path=$link ;; #(
|
||||
*) app_path=$APP_HOME$link ;;
|
||||
esac
|
||||
done
|
||||
|
||||
# This is normally unused
|
||||
# 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 -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
|
||||
|
||||
warn () {
|
||||
echo "$*"
|
||||
} >&2
|
||||
|
||||
die () {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
} >&2
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
nonstop=false
|
||||
case "$( uname )" in #(
|
||||
CYGWIN* ) cygwin=true ;; #(
|
||||
Darwin* ) darwin=true ;; #(
|
||||
MSYS* | MINGW* ) msys=true ;; #(
|
||||
NONSTOP* ) nonstop=true ;;
|
||||
esac
|
||||
|
||||
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD=$JAVA_HOME/jre/sh/java
|
||||
else
|
||||
JAVACMD=$JAVA_HOME/bin/java
|
||||
fi
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
else
|
||||
JAVACMD=java
|
||||
if ! command -v java >/dev/null 2>&1
|
||||
then
|
||||
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||
case $MAX_FD in #(
|
||||
max*)
|
||||
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
|
||||
# shellcheck disable=SC2039,SC3045
|
||||
MAX_FD=$( ulimit -H -n ) ||
|
||||
warn "Could not query maximum file descriptor limit"
|
||||
esac
|
||||
case $MAX_FD in #(
|
||||
'' | soft) :;; #(
|
||||
*)
|
||||
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
||||
# shellcheck disable=SC2039,SC3045
|
||||
ulimit -n "$MAX_FD" ||
|
||||
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||
esac
|
||||
fi
|
||||
|
||||
# Collect all arguments for the java command, stacking in reverse order:
|
||||
# * args from the command line
|
||||
# * the main class name
|
||||
# * -classpath
|
||||
# * -D...appname settings
|
||||
# * --module-path (only if needed)
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
|
||||
|
||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||
if "$cygwin" || "$msys" ; then
|
||||
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
||||
|
||||
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
||||
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
for arg do
|
||||
if
|
||||
case $arg in #(
|
||||
-*) false ;; # don't mess with options #(
|
||||
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
|
||||
[ -e "$t" ] ;; #(
|
||||
*) false ;;
|
||||
esac
|
||||
then
|
||||
arg=$( cygpath --path --ignore --mixed "$arg" )
|
||||
fi
|
||||
# Roll the args list around exactly as many times as the number of
|
||||
# args, so each arg winds up back in the position where it started, but
|
||||
# possibly modified.
|
||||
#
|
||||
# NB: a `for` loop captures its iteration list before it begins, so
|
||||
# changing the positional parameters here affects neither the number of
|
||||
# iterations, nor the values presented in `arg`.
|
||||
shift # remove old arg
|
||||
set -- "$@" "$arg" # push replacement arg
|
||||
done
|
||||
fi
|
||||
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Collect all arguments for the java command:
|
||||
# * 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" \
|
||||
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
|
||||
"$@"
|
||||
|
||||
# Stop when "xargs" is not available.
|
||||
if ! command -v xargs >/dev/null 2>&1
|
||||
then
|
||||
die "xargs is not available"
|
||||
fi
|
||||
|
||||
# Use "xargs" to parse quoted args.
|
||||
#
|
||||
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
|
||||
#
|
||||
# In Bash we could simply go:
|
||||
#
|
||||
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
|
||||
# set -- "${ARGS[@]}" "$@"
|
||||
#
|
||||
# but POSIX shell has neither arrays nor command substitution, so instead we
|
||||
# post-process each arg (as a line of input to sed) to backslash-escape any
|
||||
# character that might be a shell metacharacter, then use eval to reverse
|
||||
# that process (while maintaining the separation between arguments), and wrap
|
||||
# the whole thing up as a single "set" statement.
|
||||
#
|
||||
# This will of course break if any of these variables contains a newline or
|
||||
# an unmatched quote.
|
||||
#
|
||||
|
||||
eval "set -- $(
|
||||
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
|
||||
xargs -n1 |
|
||||
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
|
||||
tr '\n' ' '
|
||||
)" '"$@"'
|
||||
|
||||
exec "$JAVACMD" "$@"
|
||||
Vendored
+93
@@ -0,0 +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
|
||||
@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
|
||||
@@ -1,23 +0,0 @@
|
||||
|
||||
const createBot = require('./bot.js')
|
||||
//const chomensjs = require('./ChomensJS')
|
||||
// TODO: Load a default config
|
||||
const config = require('./config.json')
|
||||
const readline = require('readline')
|
||||
var buildstring = 'FNFBoyfriendBotX V4.0.8A Build:97'
|
||||
var foundationbuildstring = 'Ultimate Foundation V1.0.1 Build:31'
|
||||
const rl = readline.createInterface({
|
||||
input: process.stdin,
|
||||
output: process.stdout,
|
||||
})
|
||||
require('dotenv').config()
|
||||
const bots = []
|
||||
for (const options of config.bots) {
|
||||
const bot = createBot(options)
|
||||
bots.push(bot)
|
||||
bot.bots = bots
|
||||
bot.console.useReadlineInterface(rl)
|
||||
|
||||
bot.on('error', console.error)
|
||||
}
|
||||
//https://beta.character.ai/chat?char=-LojS2FMmI6dLLG4cPzCm1xIIpgwVktHwjHRIImfXSE
|
||||
-118
@@ -1,118 +0,0 @@
|
||||
const loadPrismarineChat = require('prismarine-chat')
|
||||
const kaboomChatParser = require('../chat/kaboom')
|
||||
const chipmunkmodChatParser = require('../chat/chipmunkmod')
|
||||
const chipmunkmodblackilykatverChatParser = require('../chat/chipmunkmodBlackilyKatVer')
|
||||
const lang = require('../lolus.json')
|
||||
const popbobChatParser = require('../chat/popbob')
|
||||
function tryParse (json) {
|
||||
try {
|
||||
return JSON.parse(json)
|
||||
} catch (error) {
|
||||
return { text: '' }
|
||||
}
|
||||
}
|
||||
//what was changed??
|
||||
function inject (bot) {
|
||||
let ChatMessage
|
||||
bot.on('registry_ready', registry => {
|
||||
ChatMessage = loadPrismarineChat(registry)
|
||||
})
|
||||
|
||||
bot.chatParsers = [kaboomChatParser, chipmunkmodChatParser, chipmunkmodblackilykatverChatParser, popbobChatParser]
|
||||
|
||||
bot.on('packet.profileless_chat', packet => {
|
||||
const message = tryParse(packet.message)
|
||||
const sender = tryParse(packet.name)
|
||||
|
||||
bot.emit('profileless_chat', {
|
||||
message,
|
||||
type: packet.type,
|
||||
sender
|
||||
})
|
||||
|
||||
bot.emit('message', message)
|
||||
|
||||
tryParsingMessage(message, { senderName: sender, players: bot.players, getMessageAsPrismarine: bot.getMessageAsPrismarine })
|
||||
})
|
||||
|
||||
bot.on('packet.player_chat', packet => {
|
||||
const unsigned = tryParse(packet.unsignedChatContent)
|
||||
|
||||
bot.emit('player_chat', { plain: packet.plainMessage, unsigned, senderUuid: packet.senderUuid })
|
||||
|
||||
bot.emit('message', unsigned)
|
||||
|
||||
tryParsingMessage(unsigned, { senderUuid: packet.senderUuid, players: bot.players, getMessageAsPrismarine: bot.getMessageAsPrismarine })
|
||||
})
|
||||
|
||||
bot.on('packet.system_chat', packet => {
|
||||
const message = tryParse(packet.content)
|
||||
|
||||
if (message.translate === 'advMode.setCommand.success') return // Ignores command set message
|
||||
|
||||
bot.emit('system_chat', { message, actionbar: packet.isActionBar })
|
||||
|
||||
if (packet.isActionBar) {
|
||||
return
|
||||
}
|
||||
|
||||
bot.emit('message', message)
|
||||
|
||||
tryParsingMessage(message, { players: bot.players, getMessageAsPrismarine: bot.getMessageAsPrismarine })
|
||||
})
|
||||
|
||||
function tryParsingMessage (message, data) {
|
||||
let parsed
|
||||
for (const parser of bot.chatParsers) {
|
||||
parsed = parser(message, data)
|
||||
if (parsed) break
|
||||
}
|
||||
|
||||
if (!parsed) return
|
||||
bot.emit('parsed_message', parsed)
|
||||
}
|
||||
|
||||
bot.getMessageAsPrismarine = message => {
|
||||
try {
|
||||
if (ChatMessage !== undefined) {
|
||||
return new ChatMessage(message)
|
||||
}
|
||||
} catch {}
|
||||
|
||||
return undefined
|
||||
}
|
||||
|
||||
bot.chat = message => {
|
||||
const acc = 0
|
||||
const bitset = Buffer.allocUnsafe(3)
|
||||
|
||||
bitset[0] = acc & 0xFF
|
||||
bitset[1] = (acc >> 8) & 0xFF
|
||||
bitset[2] = (acc >> 16) & 0xFF
|
||||
|
||||
bot._client.write('chat_message', {
|
||||
message,
|
||||
timestamp: BigInt(Date.now()),
|
||||
salt: 0n,
|
||||
offset: 0,
|
||||
acknowledged: bitset
|
||||
})
|
||||
}
|
||||
|
||||
bot.command = command => {
|
||||
bot._client.write('chat_command', {
|
||||
command,
|
||||
timestamp: BigInt(Date.now()),
|
||||
salt: 0n,
|
||||
argumentSignatures: [],
|
||||
signedPreview: false,
|
||||
messageCount: 0,
|
||||
acknowledged: Buffer.alloc(3),
|
||||
previousMessages: []
|
||||
})
|
||||
}
|
||||
|
||||
bot.tellraw = (message, selector = '@a') => bot.core.run('minecraft:tellraw @a ' + JSON.stringify(message)) // ? Should this be here?
|
||||
}
|
||||
|
||||
module.exports = inject
|
||||
@@ -1,35 +0,0 @@
|
||||
const CommandSource = require('../CommandModules/command_source')
|
||||
const CommandError = require('../CommandModules/command_error')
|
||||
|
||||
function inject (bot) {
|
||||
bot.on('parsed_message', data => {
|
||||
if (data.type !== 'minecraft:chat') return
|
||||
|
||||
const plainMessage = bot.getMessageAsPrismarine(data.contents)?.toString()
|
||||
if (!plainMessage.startsWith(bot.commandManager.prefix)) return
|
||||
const command = plainMessage.substring(bot.commandManager.prefix.length)
|
||||
|
||||
const source = new CommandSource(data.sender, { discord: false, console: false }, true)
|
||||
source.sendFeedback = message => {
|
||||
const prefix = {
|
||||
translate: '[%s%s%s] \u203a ',
|
||||
bold: false,
|
||||
color: 'white',
|
||||
with: [
|
||||
{ color: 'dark_purple', text: 'FNF', bold:true },
|
||||
{ color: 'aqua', text: 'Boyfriend', bold:true },
|
||||
{ color: 'dark_red', text: 'Bot', bold:true},
|
||||
|
||||
{ color: 'green', text: command.split(' ')[0] }
|
||||
]
|
||||
}
|
||||
|
||||
bot.tellraw(['', prefix, message])
|
||||
}
|
||||
|
||||
bot.commandManager.executeString(source, command)
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
module.exports = inject
|
||||
@@ -1,75 +0,0 @@
|
||||
function inject (bot, options) {
|
||||
bot.core = {
|
||||
// what you think im doing? look at line 17
|
||||
area: {
|
||||
start: options.core?.area.start ?? { x: 0, y: 0, z: 0 },
|
||||
end: options.core?.area.end ?? { x: 15, y: 0, z: 15 }
|
||||
},
|
||||
position: null,
|
||||
currentBlockRelative: { x: 0, y: 0, z: 0 },
|
||||
|
||||
refill () {
|
||||
const pos = bot.core.position
|
||||
const { start, end } = bot.core.area
|
||||
|
||||
if (!pos) return
|
||||
|
||||
bot.command(`fill ${pos.x + start.x} ${pos.y + start.y} ${pos.z + start.z} ${pos.x + end.x} ${pos.y + end.y} ${pos.z + end.z} repeating_command_block{CustomName: '{"text":"${bot.options.Core.customName}","color":"dark_red","clickEvent":{"action":"open_url","value":"${bot.options.Core.customName}"}}'} destroy`)
|
||||
},
|
||||
|
||||
move (pos = bot.position) {
|
||||
bot.core.position = {
|
||||
x: Math.floor(pos.x / 16) * 16,
|
||||
y: 0,
|
||||
z: Math.floor(pos.z / 16) * 16
|
||||
}
|
||||
bot.core.refill()
|
||||
},
|
||||
|
||||
currentBlock () {
|
||||
const relativePosition = bot.core.currentBlockRelative
|
||||
const corePosition = bot.core.position
|
||||
if (!corePosition) return null
|
||||
return { x: relativePosition.x + corePosition.x, y: relativePosition.y + corePosition.y, z: relativePosition.z + corePosition.z }
|
||||
},
|
||||
|
||||
incrementCurrentBlock () {
|
||||
const relativePosition = bot.core.currentBlockRelative
|
||||
const { start, end } = bot.core.area
|
||||
|
||||
relativePosition.x++
|
||||
|
||||
if (relativePosition.x > end.x) {
|
||||
relativePosition.x = start.x
|
||||
relativePosition.z++
|
||||
}
|
||||
|
||||
if (relativePosition.z > end.z) {
|
||||
relativePosition.z = start.z
|
||||
relativePosition.y++
|
||||
}
|
||||
|
||||
if (relativePosition.y > end.y) {
|
||||
relativePosition.x = start.x
|
||||
relativePosition.y = start.y
|
||||
relativePosition.z = start.z
|
||||
}
|
||||
},
|
||||
|
||||
run (command) {
|
||||
const location = bot.core.currentBlock()
|
||||
if (!location) return
|
||||
|
||||
bot._client.write('update_command_block', { command, location, mode: 1, flags: 0b100 })
|
||||
|
||||
bot.core.incrementCurrentBlock()
|
||||
}
|
||||
}
|
||||
|
||||
bot.on('move', () => {
|
||||
bot.core.move(bot.position)
|
||||
// setTimeout(() => bot.core.run('say Hello, world!'), 1000)
|
||||
})
|
||||
}
|
||||
|
||||
module.exports = inject
|
||||
@@ -1,21 +0,0 @@
|
||||
function inject (bot, options) {
|
||||
bot.cloop = {
|
||||
list: [],
|
||||
|
||||
add (command, interval) {
|
||||
this.list.push({ timer: setInterval(() => bot.core.run(command), interval), command, interval })
|
||||
},
|
||||
|
||||
remove (index) {
|
||||
clearInterval(this.list[index].timer)
|
||||
},
|
||||
|
||||
clear () {
|
||||
for (const cloop of this.list) clearInterval(cloop.timer)
|
||||
|
||||
this.list = []
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = inject
|
||||
@@ -1,88 +0,0 @@
|
||||
const fs = require('fs')
|
||||
const path = require('path')
|
||||
const CommandError = require('../CommandModules/command_error.js')
|
||||
|
||||
function inject (bot, options) {
|
||||
bot.commandManager = {
|
||||
prefix: options.commands?.prefix ?? 'default',
|
||||
commands: {},
|
||||
|
||||
execute (source, commandName, args) {
|
||||
const command = this.getCommand(commandName.toLowerCase())
|
||||
//Unknown command. Type "/help" for help
|
||||
try {
|
||||
if (!command || !command.execute) throw new CommandError({ translate: 'Unknown command %s . Type "~help" for help', with: [commandName]})
|
||||
//command.unknown.argument command.unknown.command
|
||||
//command.context.here
|
||||
if (command.consoleOnly && !source.sources.console) throw new CommandError({ translate: 'This command can only be executed via console', color: 'dark_red' })
|
||||
if (command.hashOnly && args.length === 0 && source.hash) throw new CommandError({ translate: 'Please provide a hash', color: 'dark_red' })
|
||||
|
||||
if (command.hashOnly && source.hash) {
|
||||
// debug
|
||||
// console.log(`${args} args0 ${args[0]}`) //too sus
|
||||
const hash = `${args[0]}` // this is undefined
|
||||
console.log(hash) // input hash
|
||||
console.log(bot.hash) // actual hash
|
||||
//but look in hashing.js
|
||||
if (hash !== bot.hash) throw new CommandError({ translate: 'Invalid hash', color: 'dark_red' }) // so true
|
||||
//im guessing its smh in hashing.js
|
||||
bot.updatehash
|
||||
} else if (command.hashOnly && source.sources.discord) {
|
||||
const event = source.discordMessageEvent
|
||||
|
||||
const roles = event.member?.roles?.cache
|
||||
//1106399617635061810
|
||||
const hasRole = roles.some(role => role.name === '1106399617635061810')
|
||||
|
||||
if (!hasRole) throw new CommandError({ translate: 'You are not trusted!' })
|
||||
}
|
||||
/*
|
||||
for (const filename of fs.readdirSync(path.join(__dirname, '../commands'))) {
|
||||
try {
|
||||
const command = require(path.join(__dirname, '../commands', filename))
|
||||
bot.commandManager.register(command)
|
||||
} catch (error) {
|
||||
console.error('Failed to load command', filename, ':', error)
|
||||
}
|
||||
*/
|
||||
return command.execute({ bot, source, arguments: args })
|
||||
} catch (error) {
|
||||
console.error(error)//const filename of fs.readdirSync(path.join(__dirname, '../commands'
|
||||
//console.error('Failed to load command', filename, ':', error)
|
||||
|
||||
if (error instanceof CommandError) source.sendError(error._message)
|
||||
|
||||
else source.sendError({ translate: 'command.failed', hoverEvent: { action: 'show_text', contents: String(error) } })
|
||||
}
|
||||
},
|
||||
//
|
||||
executeString (source, command) {
|
||||
const [commandName, ...args] = command.split(' ')
|
||||
return this.execute(source, commandName, args)
|
||||
},
|
||||
|
||||
register (command) {
|
||||
this.commands[command.name] = command
|
||||
},
|
||||
|
||||
getCommand (name) {
|
||||
return this.commands[name]
|
||||
},
|
||||
|
||||
getCommands () {
|
||||
return Object.values(this.commands)
|
||||
}
|
||||
}
|
||||
//
|
||||
|
||||
for (const filename of fs.readdirSync(path.join(__dirname, '../commands'))) {
|
||||
try {
|
||||
const command = require(path.join(__dirname, '../commands', filename))
|
||||
bot.commandManager.register(command)
|
||||
} catch (error) {
|
||||
console.error('Failed to load command', filename, ':', error)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = inject
|
||||
@@ -1,53 +0,0 @@
|
||||
const CommandSource = require('../CommandModules/command_source')
|
||||
//const log = require('../logger')
|
||||
|
||||
function inject (bot, options) {
|
||||
|
||||
bot.console = {
|
||||
readline: null,
|
||||
|
||||
consoleServer: 'all',
|
||||
|
||||
useReadlineInterface (rl) {
|
||||
this.readline = rl
|
||||
|
||||
rl.on('line', line => {
|
||||
if (bot.options.host !== this.consoleServer && this.consoleServer !== 'all') return
|
||||
|
||||
bot.commandManager.executeString(bot.console.source, line)
|
||||
})
|
||||
|
||||
rl.on('close', () => {
|
||||
this.readline = null
|
||||
})
|
||||
|
||||
|
||||
const originalConsole = console
|
||||
this.log = (...args) => {
|
||||
rl.output.write('\x1b[2K\r')
|
||||
originalConsole.log(args.toString())
|
||||
rl._refreshLine()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bot.console.source = new CommandSource(null, { console: true, discord: false });
|
||||
bot.console.source.sendFeedback = message => {
|
||||
const lang = require('../lolus.json')
|
||||
const ansi = bot.getMessageAsPrismarine(message)?.toAnsi(lang)
|
||||
bot.console.log(ansi)
|
||||
}
|
||||
bot.on('message', message => {
|
||||
const lang = require('../lolus.json')//idk Parker I can help
|
||||
const ansi = bot.getMessageAsPrismarine(message)?.toAnsi(lang)
|
||||
const string = bot.getMessageAsPrismarine(message)?.toString()
|
||||
|
||||
const now = new Date().toLocaleString("en-US",{timeZone:"America/CHICAGO"})
|
||||
//new Date().toLocaleString("en-US",{timeZone:"America/LOS_ANGELES"})
|
||||
bot.console.log(`[${now}] [${options.host}:${options.port}] ${ansi}`)
|
||||
//`[${now}] [${options.host}${options.port !== 25565 ? `:${options.port}` : ''}] ${ansi}`
|
||||
|
||||
// log(`[${now}] [${options.host}:${options.port}] ${string}`, true, false)
|
||||
})
|
||||
}
|
||||
module.exports = inject
|
||||
@@ -1,197 +0,0 @@
|
||||
// TODO: Maybe move client creation elsewhere
|
||||
const { escapeMarkdown } = require('../util/escapeMarkdown')
|
||||
const { Client, GatewayIntentBits } = require('discord.js')
|
||||
const { MessageContent, GuildMessages, Guilds } = GatewayIntentBits
|
||||
|
||||
const CommandSource = require('../CommandModules/command_source')
|
||||
|
||||
const client = new Client({ intents: [Guilds, GuildMessages, MessageContent] })
|
||||
|
||||
client.login(process.env.discordtoken)
|
||||
|
||||
function inject (bot, options) {
|
||||
if (!options.discord?.channelId) {
|
||||
bot.discord = { invite: options.discord?.invite }
|
||||
return
|
||||
}
|
||||
|
||||
bot.discord = {
|
||||
client,
|
||||
channel: undefined,
|
||||
invite: options.discord.invite || undefined,
|
||||
commandPrefix: options.discord.commandPrefix
|
||||
}
|
||||
|
||||
client.on('ready', () => {
|
||||
bot.discord.channel = client.channels.cache.get(options.discord.channelId)
|
||||
|
||||
})
|
||||
|
||||
// I feel like this is a modified version of ChomeNS Bot's discord plugin (the js one ofc) lol - chayapak
|
||||
|
||||
let discordQueue = '' // too lazy to make an array mabe
|
||||
setInterval(async () => {
|
||||
if (discordQueue === '') return
|
||||
try {
|
||||
await bot.discord.channel.send(discordQueue.substring(0, 2000))
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
}
|
||||
//sus
|
||||
discordQueue = ''
|
||||
}, 1000)
|
||||
//const ansi = bot.getMessageAsPrismarine(message).toAnsi(lang).replaceAll('``\`\`\u200b\ansi\n\`\`\u001b[9', '\u001b[3\n`\`\`')
|
||||
/* bot.on('message', (message) => {
|
||||
const cleanMessage = escapeMarkdown(message.toAnsi(), true)
|
||||
const discordMsg = cleanMessage
|
||||
.replaceAll('@', '@\u200b')
|
||||
.replaceAll('http', 'http\u200b')
|
||||
.replaceAll('\u001b[9', '\u001b[3')
|
||||
|
||||
queue += '\n' + discordMsg
|
||||
})
|
||||
*/
|
||||
|
||||
function sendDiscordMessage (message) {
|
||||
discordQueue += message + '\n'
|
||||
}
|
||||
|
||||
/*
|
||||
const cleanMessage = escapeMarkdown(message.toAnsi(), true)
|
||||
const discordMsg = cleanMessage
|
||||
.replaceAll('@', '@\u200b')
|
||||
.replaceAll('http', 'http\u200b')
|
||||
.replaceAll('\u001b[9', '\u001b[3')
|
||||
*/
|
||||
function sendComponent (message) {
|
||||
const lang = require('../lolus.json')
|
||||
const ansi = bot.getMessageAsPrismarine(message).toAnsi().replaceAll('```\u001b[9```' + '```\u001b[3```') // I have a function to fix ansi :shrug:
|
||||
|
||||
/*
|
||||
would it be better to do
|
||||
```
|
||||
message1
|
||||
message2
|
||||
message3...
|
||||
```
|
||||
and not
|
||||
```
|
||||
message1
|
||||
```
|
||||
````
|
||||
message2
|
||||
````
|
||||
````
|
||||
message3...
|
||||
```
|
||||
*/
|
||||
|
||||
|
||||
const now = new Date().toLocaleString("en-US",{timeZone:"America/CHICAGO"})
|
||||
try {
|
||||
sendDiscordMessage('```ansi\n' + fixansi(ansi.replaceAll('\u200b`').substring(0, 1983)) + '\n```')
|
||||
|
||||
} catch (e) {
|
||||
//i was gonna try to get it to debug via console
|
||||
console.error(`Error sending a message to Discord:\n${e.message}`)
|
||||
//already tried ansi
|
||||
}//send isnt defined
|
||||
} // its still doing the ansi crap
|
||||
//;/
|
||||
//wait a min it shows smh about unable to read properties of undefined (reading 'send') in the console or smh on startup
|
||||
// its the messages it sending read lines 69 to 86
|
||||
// i see
|
||||
bot.on('message', message => {
|
||||
sendComponent(message)
|
||||
})
|
||||
|
||||
function messageCreate (message) {
|
||||
if (message.author.id === bot.discord.client.user.id) return
|
||||
|
||||
if (message.channel.id !== bot.discord.channel.id) return
|
||||
|
||||
if (message.content.startsWith(bot.discord.commandPrefix)) { // TODO: Don't hardcode this
|
||||
const source = new CommandSource({ profile: { name: message.member.displayName } }, { discord: true, console: false }, false, message)
|
||||
source.sendFeedback = message => {
|
||||
sendComponent(message)
|
||||
}
|
||||
|
||||
bot.commandManager.executeString(source, message.content.substring(bot.discord.commandPrefix.length))
|
||||
return
|
||||
}
|
||||
|
||||
bot.tellraw({
|
||||
translate: '[%s] %s \u203a %s',
|
||||
with: [
|
||||
{
|
||||
translate: '%s%s%s %s',
|
||||
bold:false,
|
||||
with: [
|
||||
{
|
||||
text: 'FNF',
|
||||
bold: false,
|
||||
color: 'dark_purple'
|
||||
},
|
||||
{
|
||||
text: 'Boyfriend',
|
||||
bold: false,
|
||||
color: 'aqua'
|
||||
},
|
||||
{
|
||||
text: 'Bot',
|
||||
bold: false,
|
||||
color: 'dark_red'
|
||||
},
|
||||
|
||||
{
|
||||
text: 'Discord',
|
||||
bold: false,
|
||||
color: 'blue'
|
||||
}
|
||||
],
|
||||
clickEvent: bot.discord.invite ? { action: 'open_url', value: bot.discord.invite } : undefined,
|
||||
hoverEvent: { action: 'show_text', contents: 'Click to join the discord' }
|
||||
},
|
||||
{ text: message.member.displayName },
|
||||
message.content
|
||||
]
|
||||
})
|
||||
}
|
||||
client.on('messageCreate', messageCreate)
|
||||
bot.on('end', (error) => {
|
||||
|
||||
sendDiscordMessage(`\`\`\`ansi\nDisconnected: ${'error', console.error}\n\`\`\``)
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
function fixansi(message) {
|
||||
const ansilist = {
|
||||
"\x1B\[93m": "\x1B[33m", // Yellow
|
||||
"\x1B\[96m": "\x1B[36m", // Blue
|
||||
"\x1B\[94m": "\x1B[34m", // Discord Blue
|
||||
"\x1B\[90m": "\x1B[30m", // Gray
|
||||
"\x1B\[91m": "\x1B[31m", // Light Red
|
||||
"\x1B\[95m": "\x1B\[35m", // Pink
|
||||
"\x1B\[92m": "\x1B\[32m", // Green
|
||||
"\x1B\[0m": "\x1B\[0m\x1B\[37m", // White
|
||||
"\x1B\[97m": "\x1B\[0m\x1B\[37m", // White
|
||||
};
|
||||
let i = message;
|
||||
|
||||
for (const ansi in ansilist) {
|
||||
if (ansilist.hasOwnProperty(ansi)) {
|
||||
i = i.replace(new RegExp(escapeRegExpChars(ansi), 'g'), ansilist[ansi]);
|
||||
|
||||
function escapeRegExpChars(text) {
|
||||
return text.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return i;
|
||||
}
|
||||
|
||||
//
|
||||
module.exports = inject
|
||||
@@ -1,30 +0,0 @@
|
||||
// * Not real hashing
|
||||
const crypto = require('crypto')
|
||||
const ownerkey = process.env['FNFBoyfriendBot_Owner_key']
|
||||
const key = process.env['FNFBoyfriendBot_key']
|
||||
function inject (bot) {
|
||||
bot.hash = ''
|
||||
bot.ownerhash = ''
|
||||
bot.updatehashes = update
|
||||
let hash
|
||||
let owner
|
||||
const interval = setInterval(() => {
|
||||
hash = crypto.createHash('sha256').update(Math.floor(Date.now() / 10000) + key).digest('hex').substring(0, 16)
|
||||
owner = crypto.createHash('sha256').update(Math.floor(Date.now() / 10000) + ownerkey).digest('hex').substring(0, 16)
|
||||
bot.hash = hash
|
||||
bot.ownerhash = owner
|
||||
}, 2000)
|
||||
function update() {
|
||||
hash = crypto.createHash('sha256').update(Math.floor(Date.now() / 10000) + key).digest('hex').substring(0, 16)
|
||||
owner = crypto.createHash('sha256').update(Math.floor(Date.now() / 10000) + ownerkey).digest('hex').substring(0, 16)
|
||||
bot.hash = hash
|
||||
bot.ownerhash = owner
|
||||
}
|
||||
//this should work right?
|
||||
|
||||
// ok
|
||||
bot.on('end', () => {
|
||||
clearInterval(interval)
|
||||
})
|
||||
}
|
||||
module.exports = inject
|
||||
@@ -1,78 +0,0 @@
|
||||
function inject (bot) {
|
||||
bot.players = []
|
||||
//chayapak you mentally ok?
|
||||
bot.on('packet.player_info', packet => {
|
||||
const actions = []
|
||||
|
||||
if (packet.action & 0b000001) actions.push(addPlayer)
|
||||
if (packet.action & 0b000010) actions.push(initializeChat)
|
||||
if (packet.action & 0b000100) actions.push(updateGamemode)
|
||||
if (packet.action & 0b001000) actions.push(updateListed)
|
||||
if (packet.action & 0b010000) actions.push(updateLatency)
|
||||
if (packet.action & 0b100000) actions.push(updateDisplayName)
|
||||
|
||||
for (const entry of packet.data) {
|
||||
for (const action of actions) {
|
||||
action(entry)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
bot.on('player_remove', packet => {
|
||||
// TODO: Add player removal (with validation)
|
||||
})
|
||||
|
||||
function addPlayer (entry) {
|
||||
bot.players = bot.players.filter(_entry => _entry.uuid !== entry.uuid)
|
||||
bot.players.push({
|
||||
uuid: entry.uuid,
|
||||
profile: { name: entry.player.name, properties: entry.player.properties },
|
||||
|
||||
chatSession: undefined,
|
||||
gamemode: undefined,
|
||||
listed: undefined,
|
||||
latency: undefined,
|
||||
displayName: undefined
|
||||
})
|
||||
}
|
||||
|
||||
function initializeChat (entry) {
|
||||
// TODO: Handle chat sessions
|
||||
}
|
||||
|
||||
function updateGamemode (entry) {
|
||||
const target = bot.players.find(_entry => _entry.uuid === entry.uuid)
|
||||
if (!target) return
|
||||
|
||||
target.gamemode = entry.gamemode
|
||||
}
|
||||
|
||||
function updateListed (entry) {
|
||||
const target = bot.players.find(_entry => _entry.uuid === entry.uuid)
|
||||
if (!target) return
|
||||
|
||||
target.listed = entry.listed
|
||||
}
|
||||
|
||||
function updateLatency (entry) {
|
||||
const target = bot.players.find(_entry => _entry.uuid === entry.uuid)
|
||||
if (!target) return
|
||||
|
||||
target.latency = entry.latency
|
||||
}
|
||||
|
||||
function updateDisplayName (entry) {
|
||||
const target = bot.players.find(_entry => _entry.uuid === entry.uuid)
|
||||
if (!target) return
|
||||
|
||||
try {
|
||||
target.displayName = JSON.parse(entry.displayName)
|
||||
} catch {
|
||||
// do nothing
|
||||
}
|
||||
}
|
||||
|
||||
bot.on('end', () => (bot.players = []))
|
||||
}
|
||||
|
||||
module.exports = inject
|
||||
@@ -1,19 +0,0 @@
|
||||
function inject (bot) {
|
||||
bot.position = null
|
||||
|
||||
bot.on('packet.position', packet => {
|
||||
bot.position = {
|
||||
x: packet.flags & 1 ? (this.x + packet.x) : packet.x,
|
||||
y: packet.flags & 2 ? (this.y + packet.y) : packet.y,
|
||||
z: packet.flags & 4 ? (this.z + packet.z) : packet.z
|
||||
}
|
||||
|
||||
bot._client.write('teleport_confirm', { teleportId: packet.teleportId })
|
||||
|
||||
bot.emit('move')
|
||||
})
|
||||
|
||||
bot.on('end', () => { bot.position = null })
|
||||
}
|
||||
|
||||
module.exports = inject
|
||||
@@ -1,16 +0,0 @@
|
||||
const mc = require('minecraft-protocol')
|
||||
|
||||
function reconnect (bot, options) {
|
||||
bot.reconnectDelay = options.reconnectDelay ?? 5200 // Set from 1000 to 5200 - yfd
|
||||
|
||||
bot.on('end', () => {
|
||||
if (bot.reconnectDelay < 0) return
|
||||
|
||||
setTimeout(() => {
|
||||
bot._client = mc.createClient(options)
|
||||
bot.emit('init_client', bot._client)
|
||||
}, bot.reconnectDelay)
|
||||
})
|
||||
}
|
||||
|
||||
module.exports = reconnect
|
||||
@@ -1,11 +0,0 @@
|
||||
const createRegistry = require('prismarine-registry')
|
||||
|
||||
function inject (bot) {
|
||||
bot.on('packet.login', packet => {
|
||||
bot.registry = createRegistry(bot._client.version)
|
||||
bot.registry.loadDimensionCodec(packet.dimensionCodec)
|
||||
bot.emit('registry_ready', bot.registry)
|
||||
})
|
||||
}
|
||||
|
||||
module.exports = inject
|
||||
@@ -1,97 +0,0 @@
|
||||
|
||||
const util = require('util')
|
||||
|
||||
const COMMANDSPY_ENABLED_MESSAGE = { text: 'Successfully enabled CommandSpy' }
|
||||
const COMMANDSPY_DISABLED_MESSAGE = { text: 'Successfully disabled CommandSpy' }
|
||||
//You now have the tag: &8[&bPrefix &4d~&8]
|
||||
function inject (bot) {
|
||||
let entityId
|
||||
let gameMode
|
||||
let permissionLevel = 2
|
||||
let muted = false
|
||||
let commandSpyEnabled = false
|
||||
let vanished = false
|
||||
let prefix = false
|
||||
let skin = false
|
||||
/* if (data.toString().startsWith('You have been muted')) muted = true
|
||||
if (data.toString() === 'You have been unmuted.') muted = false
|
||||
*/
|
||||
//bot.on('message', (data) => {
|
||||
bot.on('message', (message, data) => {
|
||||
// Successfully removed your skin
|
||||
const stringmessage = bot.getMessageAsPrismarine(message)?.toString()
|
||||
if (stringmessage.startsWith('You have been muted')) muted = true
|
||||
else if (stringmessage === "You have been unmuted.") muted = false
|
||||
else if (util.isDeepStrictEqual(message, COMMANDSPY_ENABLED_MESSAGE)) commandSpyEnabled = true
|
||||
else if (util.isDeepStrictEqual(message, COMMANDSPY_DISABLED_MESSAGE)) commandSpyEnabled = false
|
||||
else if (stringmessage === `You now have the tag: &8[&bPrefix &4${bot.options.commands.prefix}&8]`) {
|
||||
prefix = true
|
||||
return
|
||||
}
|
||||
else if (stringmessage.startsWith("You now have the tag: ") || stringmessage === "You no longer have a tag") prefix = false
|
||||
else if (stringmessage === `Successfully set your skin to Parker2991's`) {
|
||||
skin = true
|
||||
return
|
||||
}
|
||||
else if (stringmessage.startsWith("Successfully removed your skin") || stringmessage === "Successfully removed your skin") skin = false
|
||||
if (message?.text !== '' || !Array.isArray(message.extra) || message.extra.length < 2 || !message.extra[0]?.text?.startsWith('Vanish for') || message.extra[0].color !== 'gold') return
|
||||
|
||||
const suffix = message.extra[message.extra.length - 1]
|
||||
|
||||
if (suffix?.color !== 'gold') return
|
||||
//data.toString().startsWith
|
||||
if (suffix.text?.endsWith(': enabled')) vanished = true
|
||||
else if (suffix.text?.endsWith(': disabled')) vanished = false // Bruh what is this ohio code
|
||||
//
|
||||
|
||||
|
||||
})
|
||||
|
||||
bot.on('packet.entity_status', packet => {
|
||||
if (packet.entityId !== entityId || packet.entityStatus < 24 || packet.entityStatus > 28) return
|
||||
permissionLevel = packet.entityStatus - 24
|
||||
})//
|
||||
//TO-DO create a array for nick, prefix, and mabe username in selfcare so that when it joins or has the nick/prefix changed it will change it back to the set nick and prefix in selfcare
|
||||
|
||||
bot.on('packet.game_state_change', packet => {
|
||||
if (packet.reason !== 3) return // Reason 3 = Change Game Mode
|
||||
|
||||
gameMode = packet.gameMode
|
||||
})
|
||||
|
||||
let timer
|
||||
bot.on('packet.login', (packet) => {
|
||||
entityId = packet.entityId
|
||||
gameMode = packet.gameMode
|
||||
|
||||
timer = setInterval(() => {
|
||||
if (permissionLevel < 2) bot.command('op @s[type=player]')
|
||||
else if (!commandSpyEnabled) bot.command('commandspy:commandspy on')
|
||||
else if (!vanished) bot.command('essentials:vanish enable')
|
||||
else if (muted) bot.command(`essentials:mute ${bot.uuid}`)
|
||||
else if (!prefix) bot.command(`prefix &8[&bPrefix &4${bot.options.commands.prefix}&8]`)
|
||||
else if (gameMode !== 1) bot.command('gamemode creative @s[type=player]')
|
||||
else if (!skin) bot.command('skin Parker2991')
|
||||
}, 500)
|
||||
})
|
||||
|
||||
bot.on('end', () => {
|
||||
if (timer) clearInterval(timer)
|
||||
prefix = false
|
||||
muted = false
|
||||
commandSpyEnabled = false
|
||||
vanished = false
|
||||
skin = false
|
||||
})
|
||||
}
|
||||
|
||||
module.exports = inject
|
||||
/*const buildstring = process.env['buildstring']
|
||||
bot.on('login', async () => {
|
||||
console.log(`starting ${buildstring}`)
|
||||
await bot.discord.channel.send(`Starting ${buildstring}`)
|
||||
await sendChat('/prefix &8[&4Prefix ~ &8]')
|
||||
await sendChat(buildstring)
|
||||
await sendChat('Prefix ~')
|
||||
})
|
||||
}*/
|
||||
@@ -1,13 +0,0 @@
|
||||
function inject (bot, context) {
|
||||
|
||||
const buildstring = process.env['buildstring']
|
||||
const util = require('node:util')
|
||||
const { EventEmitter } = require('events')
|
||||
console.log(`Starting ${buildstring} .......`)
|
||||
console.log(`Username: ${bot.options.username}`)
|
||||
console.log(`Host: ${bot.options.host}:${bot.options.port}`)
|
||||
|
||||
|
||||
}
|
||||
|
||||
module.exports = inject
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user