diff --git a/.gitignore b/.gitignore
index e93da693..47adc4ae 100644
--- a/.gitignore
+++ b/.gitignore
@@ -14,6 +14,7 @@ src/db/giveaways.json
## CONFIDENCIAL files
+/backups
src/Archive
src/Client/Plugins/nodes.js
src/Config/player.js
diff --git a/LICENSE b/LICENSE
index 3d9a1514..4044ef39 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,201 +1,674 @@
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [2021] [ZulyBot]
-
- 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
-
- http://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.
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc.
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+
+ Copyright (C) 2022 André Lucas
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ Zuly Copyright (C) 2022 André Lucas
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+.
\ No newline at end of file
diff --git a/package.json b/package.json
index 6a6cb352..c6ad075d 100644
--- a/package.json
+++ b/package.json
@@ -43,10 +43,11 @@
"canvas": "2.8.0",
"colors": "^1.4.0",
"deepai": "^1.0.17",
+ "discord-backup": "^3.0.1",
+ "discord-giveaways": "^5.1.1",
"discord.js": "^13.6.0",
"eris": "0.16.1",
"eris-collector": "^1.0.1",
- "eris-giveaways": "^1.0.3",
"express": "^4.17.2",
"math-expression-evaluator": "^1.3.8",
"moment": "^2.29.1",
diff --git a/src/Client/Plugins/lavalinkManager.js b/src/Client/Plugins/lavalinkManager.js
index 8e18cc51..6659c234 100644
--- a/src/Client/Plugins/lavalinkManager.js
+++ b/src/Client/Plugins/lavalinkManager.js
@@ -35,7 +35,7 @@ global.zuly.music = new Manager({
status: !1
});
}).on('trackStart', async (player, track) => {
- const ch = await global.zuly.getRESTChannel(player.textChannel);
+ const ch = await global.zuly.channels.cache.get(player.textChannel);
let idioma = require('../../Config/idiomas.js');
let lang = await global.zuly.db.get(`idioma-${ch.guild.id}`) || 'pt_br';
lang = lang.replace(/-/g, '_');
@@ -43,12 +43,12 @@ global.zuly.music = new Manager({
const embed = new global.zuly.manager.Ebl();
embed.setDescription(`<:zu_mp3:882310253226635284> **|** ${idioma.erela.np} **${track.title}**`);
embed.setColor('#ffcbdb');
- embed.setFooter('⤷ zulybot.xyz', global.zuly.user.avatarURL);
+ embed.setFooter('⤷ zulybot.xyz', global.zuly.user.displayAvatarURL({ dynamic: true, format: 'png', size: 4096 }));
ch.createMessage({
embeds: [embed.get()]
});
}).on('queueEnd', async (player) => {
- const ch = await global.zuly.getRESTChannel(player.textChannel);
+ const ch = await global.zuly.channels.cache.get(player.textChannel);
let idioma = require('../../Config/idiomas.js');
let lang = await global.zuly.db.get(`idioma-${ch.guild.id}`) || 'pt_br';
lang = lang.replace(/-/g, '_');
@@ -56,13 +56,13 @@ global.zuly.music = new Manager({
const embed = new global.zuly.manager.Ebl();
embed.setDescription(`<:zu_mp3:882310253226635284> **|** ${idioma.erela.end}`);
embed.setColor('#ffcbdb');
- embed.setFooter('⤷ zulybot.xyz', global.zuly.user.avatarURL);
+ embed.setFooter('⤷ zulybot.xyz', global.zuly.user.displayAvatarURL({ dynamic: true, format: 'png', size: 4096 }));
ch.createMessage({
embeds: [embed.get()]
});
player.destroy();
}).on('playerMove', async (player, currentChannel, newChannel) => {
- player.voiceChannel = await global.zuly.getRESTChannel(newChannel);
+ player.voiceChannel = await global.zuly.channels.cache.get(newChannel);
}).on('socketClosed', (player, payload) => {
if (payload.byRemote == true) {
player.destroy();
diff --git a/src/Commands/Anime/RandomAnimeCommand.js b/src/Commands/Anime/RandomAnimeCommand.js
index e0ea803a..97ab0325 100644
--- a/src/Commands/Anime/RandomAnimeCommand.js
+++ b/src/Commands/Anime/RandomAnimeCommand.js
@@ -92,7 +92,7 @@ module.exports = class RandomAnimeCommand {
embed.setThumbnail(anime.attributes.posterImage.large);
embed.setFooter('⤷ zulybot.xyz');
ctx.message.channel.slashReply({
- content: ctx.message.author,
+ content: ctx.message.author.mention,
embeds: [embed.get()]
});
});
diff --git a/src/Commands/Config/AntiNSFW.js b/src/Commands/Config/AntiNSFW.js
index 8c7aadef..621e8fde 100644
--- a/src/Commands/Config/AntiNSFW.js
+++ b/src/Commands/Config/AntiNSFW.js
@@ -2,7 +2,7 @@ module.exports = class LangCommand {
constructor () {
return {
permissoes: {
- membro: ['manageGuild'],
+ membro: ['MANAGE_GUILD'],
bot: []
},
pt: {
@@ -43,13 +43,13 @@ module.exports = class LangCommand {
if (nsfw) {
await global.zuly.db.delete(`nsfw-${ctx.message.guild.id}`);
return ctx.message.channel.slashReply({
- content: `:x: ${ctx.message.author} **|** ${ctx.idioma.nsfw.desativado}`
+ content: `:x: ${ctx.message.author.mention} **|** ${ctx.idioma.nsfw.desativado}`
});
}
else {
await global.zuly.db.set(`nsfw-${ctx.message.guild.id}`, true);
return ctx.message.channel.slashReply({
- content: `:x: ${ctx.message.author} **|** ${ctx.idioma.nsfw.ativado}`
+ content: `:x: ${ctx.message.author.mention} **|** ${ctx.idioma.nsfw.ativado}`
});
}
}
diff --git a/src/Commands/Config/AutoroleCommand.js b/src/Commands/Config/AutoroleCommand.js
index f15b98fa..adaf29ad 100644
--- a/src/Commands/Config/AutoroleCommand.js
+++ b/src/Commands/Config/AutoroleCommand.js
@@ -4,8 +4,8 @@ module.exports = class AutoroleCommand {
constructor () {
return {
permissoes: {
- membro: ['manageGuild', 'manageRoles'],
- bot: ['manageRoles', 'useExternalEmojis', 'addReactions', 'manageMessages']
+ membro: ['MANAGE_GUILD', 'manageRoles'],
+ bot: ['manageRoles', 'useExternalEmojis', 'ADD_REACTIONS', 'manageMessages']
},
pt: {
nome: 'autorole',
@@ -74,8 +74,8 @@ module.exports = class AutoroleCommand {
// COR DA EMBED
embed.setColor('#ffcbdb');
// CRIANDO OS NEGOCIO
- ctx.message.createMessage({
- content: ctx.message.author,
+ ctx.message.editReply({
+ content: ctx.message.author.mention,
embeds: [embed.get()]
}).then(msg => {
// ADICIONANDO REAÇÕES
@@ -116,8 +116,8 @@ module.exports = class AutoroleCommand {
bot.on('collect', () => {
msg.delete();
// INICIANDO COLETOR
- ctx.message.createMessage({
- content: `:white_check_mark: ${ctx.message.author} **|** ${ctx.idioma.autorole.bot}`
+ ctx.message.editReply({
+ content: `:white_check_mark: ${ctx.message.author.mention} **|** ${ctx.idioma.autorole.bot}`
}).then(m => {
const mcol = new MessageCollector(m.channel, {
user: ctx.message.author,
@@ -134,11 +134,11 @@ module.exports = class AutoroleCommand {
// EMBED DE AUTOROLE-BOT
const embed2 = new global.zuly.manager.Ebl();
embed2.setTitle(`📋 Autorole | ${global.zuly.user.username}`);
- embed2.setDescription(`:white_check_mark: ${ctx.message.author} **|** ${ctx.idioma.autorole.botset} ${addrole.map((rolee) => `<@&${rolee}>`).join(', ')}`);
+ embed2.setDescription(`:white_check_mark: ${ctx.message.author.mention} **|** ${ctx.idioma.autorole.botset} ${addrole.map((rolee) => `<@&${rolee}>`).join(', ')}`);
embed2.setColor('#ffcbdb');
// ENVIANDO A EMBED E CRIANDO AS COISAS
- ctx.message.createMessage({
- content: ctx.message.author,
+ ctx.message.editReply({
+ content: ctx.message.author.mention,
embeds: [embed2.get()]
});
if (!autorolebot) {
@@ -163,8 +163,8 @@ module.exports = class AutoroleCommand {
user.on('collect', () => {
msg.delete();
// INICIANDO COLETOR
- ctx.message.createMessage({
- content: `:white_check_mark: ${ctx.message.author} **|** ${ctx.idioma.autorole.user}`
+ ctx.message.editReply({
+ content: `:white_check_mark: ${ctx.message.author.mention} **|** ${ctx.idioma.autorole.user}`
}).then(m => {
const mcol = new MessageCollector(m.channel, {
user: ctx.message.author,
@@ -181,11 +181,11 @@ module.exports = class AutoroleCommand {
// EMBED DE AUTOROLE-USER
const embed3 = new global.zuly.manager.Ebl();
embed3.setTitle(`📋 Autorole | ${global.zuly.user.username}`);
- embed3.setDescription(`:white_check_mark: ${ctx.message.author} **|** ${ctx.idioma.autorole.userset} ${addrole.map((rolee) => `<@&${rolee}>`).join(', ')}`);
+ embed3.setDescription(`:white_check_mark: ${ctx.message.author.mention} **|** ${ctx.idioma.autorole.userset} ${addrole.map((rolee) => `<@&${rolee}>`).join(', ')}`);
embed3.setColor('#ffcbdb');
// ENVIANDO A EMBED E CRIANDO AS COISAS
- ctx.message.createMessage({
- content: ctx.message.author,
+ ctx.message.editReply({
+ content: ctx.message.author.mention,
embeds: [embed3.get()]
});
if (!autoroleuser) {
@@ -213,10 +213,10 @@ module.exports = class AutoroleCommand {
// EMBED DE AUTOROLE-DELETED
const delb = new global.zuly.manager.Ebl();
delb.setTitle(`📋 Autorole | ${global.zuly.user.username}`);
- delb.setDescription(`:white_check_mark: ${ctx.message.author} **|** ${ctx.idioma.autorole.disabled}`);
+ delb.setDescription(`:white_check_mark: ${ctx.message.author.mention} **|** ${ctx.idioma.autorole.disabled}`);
delb.setColor('#ffcbdb');
- return ctx.message.createMessage({
- content: ctx.message.author,
+ return ctx.message.editReply({
+ content: ctx.message.author.mention,
embeds: [delb.get()]
}).then(() => {
msg.delete();
diff --git a/src/Commands/Config/CustomCommand.js b/src/Commands/Config/CustomCommand.js
index 7ccc5fa2..8433175d 100644
--- a/src/Commands/Config/CustomCommand.js
+++ b/src/Commands/Config/CustomCommand.js
@@ -2,7 +2,7 @@ module.exports = class LangCommand {
constructor () {
return {
permissoes: {
- membro: ['manageGuild'],
+ membro: ['MANAGE_GUILD'],
bot: []
},
pt: {
@@ -62,7 +62,7 @@ module.exports = class LangCommand {
const command = await global.zuly.commands.get(nome);
if (command) {
return ctx.message.channel.slashReply({
- content: `:x: ${ctx.message.author} **|** ${ctx.idioma.alreadyExists}`
+ content: `:x: ${ctx.message.author.mention} **|** ${ctx.idioma.alreadyExists}`
});
}
await global.zuly.requestHandler.request('POST', `/applications/${global.zuly.user.id}/guilds/${ctx.message.guild.id}/commands`, true, {
@@ -71,7 +71,7 @@ module.exports = class LangCommand {
description: `[🌀 » Custom] ${ctx.args[1] || 'No Description'}`,
});
ctx.message.channel.slashReply({
- content: `:white_check_mark: ${ctx.message.author} **|** ${ctx.idioma.customCommand}`.replace('%n', nome)
+ content: `:white_check_mark: ${ctx.message.author.mention} **|** ${ctx.idioma.customCommand}`.replace('%n', nome)
}).then(async () => {
await global.zuly.db.set(`custom-command-${nome}-${ctx.message.guild.id}`, ctx.args[2]);
});
diff --git a/src/Commands/Config/FNShopCommand.js b/src/Commands/Config/FNShopCommand.js
index 9faa0ad4..720332a2 100644
--- a/src/Commands/Config/FNShopCommand.js
+++ b/src/Commands/Config/FNShopCommand.js
@@ -2,7 +2,7 @@ module.exports = class LangCommand {
constructor () {
return {
permissoes: {
- membro: ['manageGuild'],
+ membro: ['MANAGE_GUILD'],
bot: []
},
pt: {
@@ -46,23 +46,23 @@ module.exports = class LangCommand {
async run (ctx) {
if (!ctx.args[0]) {
return ctx.message.channel.slashReply({
- content: `:x: ${ctx.message.author} **|** ${ctx.idioma.fnshop.args}`
+ content: `:x: ${ctx.message.author.mention} **|** ${ctx.idioma.fnshop.args}`
});
}
const fnshop = await global.zuly.db.get(`fnshop-${ctx.message.guild.id}`);
if (!fnshop) {
- const canal = await global.zuly.getRESTChannel(ctx.args[0].replace(/<#/g, '').replace(/>/g, ''));
+ const canal = await global.zuly.channels.cache.get(ctx.args[0].replace(/<#/g, '').replace(/>/g, ''));
try {
canal.createMessage(' **|** https://fn.zulybot.xyz/shop-now.png').then(async () => {
await global.zuly.db.set(`fnshop-${ctx.message.guild.id}`, canal.id);
ctx.message.channel.slashReply({
- content: `✅ ${ctx.message.author} **|** ${ctx.idioma.fnshop.sucess}`
+ content: `✅ ${ctx.message.author.mention} **|** ${ctx.idioma.fnshop.sucess}`
});
});
}
catch (e) {
return ctx.message.channel.slashReply({
- content: `:x: ${ctx.message.author} **|** ${ctx.idioma.fnshop.channel}`
+ content: `:x: ${ctx.message.author.mention} **|** ${ctx.idioma.fnshop.channel}`
});
}
}
diff --git a/src/Commands/Config/LangCommand.js b/src/Commands/Config/LangCommand.js
index 72215283..22374d8a 100644
--- a/src/Commands/Config/LangCommand.js
+++ b/src/Commands/Config/LangCommand.js
@@ -2,7 +2,7 @@ module.exports = class LangCommand {
constructor () {
return {
permissoes: {
- membro: ['manageGuild'],
+ membro: ['MANAGE_GUILD'],
bot: []
},
pt: {
@@ -64,7 +64,7 @@ module.exports = class LangCommand {
if (!ctx.args[0]) {
return ctx.message.channel.slashReply({
- content: `:x: ${ctx.message.author} **|** ${ctx.idioma.multiLang.insertLang}`.replace('%p', ctx.prefix).replace('%langs', langs.join(', '))
+ content: `:x: ${ctx.message.author.mention} **|** ${ctx.idioma.multiLang.insertLang}`.replace('%p', ctx.prefix).replace('%langs', langs.join(', '))
});
}
@@ -76,7 +76,7 @@ module.exports = class LangCommand {
});
if (langSelecionada == null) {
- return ctx.message.channel.slashReply(`:x: ${ctx.message.author} **|** ${ctx.idioma.multiLang.unknownLanguage}`.replace('%langs', '`' + langs.join(', ') + '`'));
+ return ctx.message.channel.slashReply(`:x: ${ctx.message.author.mention} **|** ${ctx.idioma.multiLang.unknownLanguage}`.replace('%langs', '`' + langs.join(', ') + '`'));
}
else {
switch (langSelecionada) {
diff --git a/src/Commands/Config/LogsCommand.js b/src/Commands/Config/LogsCommand.js
index df097e6e..1bdf1079 100644
--- a/src/Commands/Config/LogsCommand.js
+++ b/src/Commands/Config/LogsCommand.js
@@ -2,7 +2,7 @@ module.exports = class LangCommand {
constructor () {
return {
permissoes: {
- membro: ['manageGuild'],
+ membro: ['MANAGE_GUILD'],
bot: []
},
pt: {
@@ -46,11 +46,11 @@ module.exports = class LangCommand {
}
async run (ctx) {
- const canal = await global.zuly.getRESTChannel(ctx.args[0].replace(/<#/g, '').replace(/>/g, ''));
+ const canal = await global.zuly.channels.cache.get(ctx.args[0].replace(/<#/g, '').replace(/>/g, ''));
await global.zuly.db.set(`logs-${ctx.message.guild.id}`, canal.id);
ctx.message.channel.slashReply({
- content: `:white_check_mark: ${ctx.message.author} **|** ${ctx.idioma.logs.set}`.replace('%c', canal.name)
+ content: `:white_check_mark: ${ctx.message.author.mention} **|** ${ctx.idioma.logs.set}`.replace('%c', canal.name)
});
}
};
diff --git a/src/Commands/Config/ReactionRole.js b/src/Commands/Config/ReactionRole.js
index 7ccbf204..b4f9fafa 100644
--- a/src/Commands/Config/ReactionRole.js
+++ b/src/Commands/Config/ReactionRole.js
@@ -2,8 +2,8 @@ module.exports = class ReactionRoleCommand {
constructor () {
return {
permissoes: {
- membro: ['manageGuild', 'manageRoles'],
- bot: ['manageRoles', 'useExternalEmojis', 'addReactions']
+ membro: ['MANAGE_GUILD', 'manageRoles'],
+ bot: ['manageRoles', 'useExternalEmojis', 'ADD_REACTIONS']
},
pt: {
nome: 'reactionrole',
@@ -65,12 +65,12 @@ module.exports = class ReactionRoleCommand {
const mensagem = await global.zuly.getMessage(ctx.message.channel.id, message_id);
if (!mensagem) {
return ctx.message.channel.slashReply({
- content: `:x: ${ctx.message.author} **|** ${ctx.idioma.reactionRole.invalidMessage.replace('%id%', message_id)}`
+ content: `:x: ${ctx.message.author.mention} **|** ${ctx.idioma.reactionRole.invalidMessage.replace('%id%', message_id)}`
});
}
else {
return ctx.message.channel.slashReply({
- content: `✅ ${ctx.message.author} **|** ${ctx.idioma.reactionRole.sucess.replace('%id%', message_id)}`
+ content: `✅ ${ctx.message.author.mention} **|** ${ctx.idioma.reactionRole.sucess.replace('%id%', message_id)}`
}).then(async () => {
await global.zuly.db.set(`reaction-${emojiName}-${message_id}`, role.id);
return mensagem.addReaction(ctx.args[2].replace(//g, '').replace(/<:/g, ''));
diff --git a/src/Commands/Config/TicketSetup.js b/src/Commands/Config/TicketSetup.js
index 2c9cf915..3120f504 100644
--- a/src/Commands/Config/TicketSetup.js
+++ b/src/Commands/Config/TicketSetup.js
@@ -2,7 +2,7 @@ module.exports = class TicketCommand {
constructor () {
return {
permissoes: {
- membro: ['manageGuild'],
+ membro: ['MANAGE_GUILD'],
bot: []
},
pt: {
@@ -40,7 +40,7 @@ module.exports = class TicketCommand {
async run (ctx) {
ctx.message.channel.slashReply({
- content: `✅ ${ctx.message.author} **|** ${ctx.idioma.ticket.sus}`,
+ content: `✅ ${ctx.message.author.mention} **|** ${ctx.idioma.ticket.sus}`,
flags: ctx.ephemeral
});
global.zuly.createMessage(ctx.message.channel.id, { embed:{
diff --git a/src/Commands/Developer/BotbanCommand.js b/src/Commands/Developer/BotbanCommand.js
index d3bab7a3..dcadf8b1 100644
--- a/src/Commands/Developer/BotbanCommand.js
+++ b/src/Commands/Developer/BotbanCommand.js
@@ -62,14 +62,14 @@ module.exports = class BanCommand {
let member;
if (!ctx.args[0]) {
return ctx.message.channel.slashReply({
- content: `:x: ${ctx.message.author} **|** ${ctx.idioma.ban.noarg}`
+ content: `:x: ${ctx.message.author.mention} **|** ${ctx.idioma.ban.noarg}`
});
}
if (!ctx.messages[0]) {
member = await global.zuly.users.fetch(ctx.args[0]).then(info => info).catch(() => {
return ctx.message.channel.slashReply({
- content: `:x: ${ctx.message.author} **|** Usuário desconhecido.`
+ content: `:x: ${ctx.message.author.mention} **|** Usuário desconhecido.`
});
});
}
@@ -86,13 +86,13 @@ module.exports = class BanCommand {
const devs = await global.zuly.db.get('devs');
if (devs.includes(member.id)) {
return ctx.message.channel.slashReply({
- content: `:x: ${ctx.message.author} **|** ${ctx.idioma.ban.dev}`
+ content: `:x: ${ctx.message.author.mention} **|** ${ctx.idioma.ban.dev}`
});
}
await global.zuly.db.set(`botban-${member.id}`, motivo);
ctx.message.channel.slashReply({
- content: `:white_check_mark: ${ctx.message.author} **|** ${ctx.idioma.ban.the} **${member.username}** ${ctx.idioma.ban.foi}`
+ content: `:white_check_mark: ${ctx.message.author.mention} **|** ${ctx.idioma.ban.the} **${member.username}** ${ctx.idioma.ban.foi}`
});
}
};
diff --git a/src/Commands/Developer/BotunbanCommand.js b/src/Commands/Developer/BotunbanCommand.js
index 4a52f8b8..86985206 100644
--- a/src/Commands/Developer/BotunbanCommand.js
+++ b/src/Commands/Developer/BotunbanCommand.js
@@ -62,14 +62,14 @@ module.exports = class BanCommand {
let member;
if (!ctx.args[0]) {
return ctx.message.channel.slashReply({
- content: `:x: ${ctx.message.author} **|** ${ctx.idioma.ban.noarg}`
+ content: `:x: ${ctx.message.author.mention} **|** ${ctx.idioma.ban.noarg}`
});
}
if (!ctx.messages[0]) {
member = await global.zuly.users.fetch(ctx.args[0]).then(info => info).catch(() => {
return ctx.message.channel.slashReply({
- content: `:x: ${ctx.message.author} **|** Usuário desconhecido.`
+ content: `:x: ${ctx.message.author.mention} **|** Usuário desconhecido.`
});
});
}
@@ -86,7 +86,7 @@ module.exports = class BanCommand {
await global.zuly.db.delete(`botban-${member.id}`);
ctx.message.channel.slashReply({
- content: `:white_check_mark: ${ctx.message.author} **|** ${ctx.idioma.ban.the} **${member.username}** ${ctx.idioma.ban.foi}`
+ content: `:white_check_mark: ${ctx.message.author.mention} **|** ${ctx.idioma.ban.the} **${member.username}** ${ctx.idioma.ban.foi}`
});
}
};
diff --git a/src/Commands/Developer/DiscordJSCommand.js b/src/Commands/Developer/DiscordJSCommand.js
index 4bff9f36..5fc0aa2f 100644
--- a/src/Commands/Developer/DiscordJSCommand.js
+++ b/src/Commands/Developer/DiscordJSCommand.js
@@ -47,7 +47,7 @@ module.exports = class ExecCommand {
async run (ctx) {
if (!ctx.args[0]) {
return ctx.message.channel.slashReply({
- content: `:x: ${ctx.message.author} **|** ${ctx.idioma.docs.args}`
+ content: `:x: ${ctx.message.author.mention} **|** ${ctx.idioma.docs.args}`
});
};
const { get } = require('axios');
@@ -56,12 +56,12 @@ module.exports = class ExecCommand {
const embed = new ctx.embed();
embed.setTitle('<:zu_djs:904418845631082506> Discord.js Docs');
embed.setColor('#ffcbdb');
- embed.setThumbnail(global.zuly.user.avatarURL);
- embed.setFooter('⤷ zulybot.xyz', global.zuly.user.avatarURL);
+ embed.setThumbnail(global.zuly.user.displayAvatarURL({ dynamic: true, format: 'png', size: 4096 }));
+ embed.setFooter('⤷ zulybot.xyz', global.zuly.user.displayAvatarURL({ dynamic: true, format: 'png', size: 4096 }));
if (!res.fields) {
embed.setDescription(`${res.description}`);
ctx.message.channel.slashReply({
- content: ctx.message.author,
+ content: ctx.message.author.mention,
embeds: [embed.get()]
});
}
@@ -72,7 +72,7 @@ module.exports = class ExecCommand {
embed.addField(resu.name, resu.value);
});
ctx.message.channel.slashReply({
- content: ctx.message.author,
+ content: ctx.message.author.mention,
embeds: [embed.get()]
});
}
diff --git a/src/Commands/Developer/ErisCommand.js b/src/Commands/Developer/ErisCommand.js
index 8edecb2e..9f2c517d 100644
--- a/src/Commands/Developer/ErisCommand.js
+++ b/src/Commands/Developer/ErisCommand.js
@@ -47,7 +47,7 @@ module.exports = class ExecCommand {
async run (ctx) {
if (!ctx.args[0]) {
return ctx.message.channel.slashReply({
- content: `:x: ${ctx.message.author} **|** ${ctx.idioma.docs.args}`
+ content: `:x: ${ctx.message.author.mention} **|** ${ctx.idioma.docs.args}`
});
};
const {
@@ -58,12 +58,12 @@ module.exports = class ExecCommand {
const embed = new ctx.embed();
embed.setTitle('<:zu_eris:904419966323933184> Eris Docs');
embed.setColor('#ffcbdb');
- embed.setThumbnail(global.zuly.user.avatarURL);
- embed.setFooter('⤷ zulybot.xyz', global.zuly.user.avatarURL);
+ embed.setThumbnail(global.zuly.user.displayAvatarURL({ dynamic: true, format: 'png', size: 4096 }));
+ embed.setFooter('⤷ zulybot.xyz', global.zuly.user.displayAvatarURL({ dynamic: true, format: 'png', size: 4096 }));
if (!res.embed.fields) {
embed.setDescription(`>>> 📘 ${res.embed.description}`);
ctx.message.channel.slashReply({
- content: ctx.message.author,
+ content: ctx.message.author.mention,
embeds: [embed.get()]
});
}
@@ -73,7 +73,7 @@ module.exports = class ExecCommand {
embed.addField(resu.name, resu.value);
});
ctx.message.channel.slashReply({
- content: ctx.message.author,
+ content: ctx.message.author.mention,
embeds: [embed.get()]
});
}
diff --git a/src/Commands/Developer/EvalCommand.js b/src/Commands/Developer/EvalCommand.js
index a362c48b..40843b26 100644
--- a/src/Commands/Developer/EvalCommand.js
+++ b/src/Commands/Developer/EvalCommand.js
@@ -52,7 +52,7 @@ module.exports = class EvalCommand {
const msg = ctx.args.join(' ');
if (!msg) {
return ctx.message.channel.slashReply({
- content: `:x: ${ctx.message.author} **|** Insira o código que será evaluado!`,
+ content: `:x: ${ctx.message.author.mention} **|** Insira o código que será evaluado!`,
flags: ctx.ephemeral
});
}
diff --git a/src/Commands/Developer/ExecCommand.js b/src/Commands/Developer/ExecCommand.js
index 0b21f4df..4f8f48ed 100644
--- a/src/Commands/Developer/ExecCommand.js
+++ b/src/Commands/Developer/ExecCommand.js
@@ -51,26 +51,26 @@ module.exports = class ExecCommand {
const code = ctx.args[0];
if (!code) {
return ctx.message.channel.slashReply({
- content: `:x: ${ctx.message.author} **|** Insira o código que será executado!`,
+ content: `:x: ${ctx.message.author.mention} **|** Insira o código que será executado!`,
flags: ctx.ephemeral
});
}
else {
ctx.message.channel.slashReply({
- content: `:white_check_mark: ${ctx.message.author} **|** Executando...`,
+ content: `:white_check_mark: ${ctx.message.author.mention} **|** Executando...`,
flags: ctx.ephemeral
});
try {
exec(code, (_erro, val) => {
- ctx.message.createFollowup({
- content: `:white_check_mark: ${ctx.message.author} **|** ${val}`,
+ ctx.message.channel.slashReply({
+ content: `:white_check_mark: ${ctx.message.author.mention} **|** ${val}`,
flags: ctx.ephemeral
});
});
}
catch (err) {
- ctx.message.createFollowup({
- content: `:x: ${ctx.message.author} **|** ${err}`,
+ ctx.message.channel.slashReply({
+ content: `:x: ${ctx.message.author.mention} **|** ${err}`,
flags: ctx.ephemeral
});
}
diff --git a/src/Commands/Developer/PromoCreateCommand.js b/src/Commands/Developer/PromoCreateCommand.js
index 6fe956ae..92e1c2d1 100644
--- a/src/Commands/Developer/PromoCreateCommand.js
+++ b/src/Commands/Developer/PromoCreateCommand.js
@@ -55,13 +55,13 @@ module.exports = class EvalCommand {
async run (ctx) {
if (!ctx.args[0] || !ctx.args[1]) {
return ctx.message.channel.slashReply({
- content: `:x: ${ctx.message.author} **|** Insira os 2 campos, \`${ctx.prefix}pcreate \``,
+ content: `:x: ${ctx.message.author.mention} **|** Insira os 2 campos, \`${ctx.prefix}pcreate \``,
flags: ctx.ephemeral
});
}
if (isNaN(ctx.args[1])) {
return ctx.message.channel.slashReply({
- content: `:x: ${ctx.message.author} **|** O Valor não é um número exato.`,
+ content: `:x: ${ctx.message.author.mention} **|** O Valor não é um número exato.`,
flags: ctx.ephemeral
});
}
@@ -69,16 +69,16 @@ module.exports = class EvalCommand {
const code = await global.zuly.db.get(ctx.args[0].toUpperCase());
if (code) {
return ctx.message.channel.slashReply({
- content: `:x: ${ctx.message.author} **|** Esse código já existe`,
+ content: `:x: ${ctx.message.author.mention} **|** Esse código já existe`,
flags: ctx.ephemeral
});
}
else {
await global.zuly.db.set(ctx.args[0].toUpperCase(), Number(ctx.args[1]));
- const channel = await global.zuly.getRESTChannel('894981159119896576');
+ const channel = await global.zuly.channels.cache.get('894981159119896576');
channel.createMessage(`<:zu_ticket:890950181120507935> <@&894983704554930247> **|** Novo promocode: **${ctx.args[0].toUpperCase()}** valendo **${Number(ctx.args[1])} ryos.**`);
return ctx.message.channel.slashReply({
- content: `✅ ${ctx.message.author} **|** Promocode **${ctx.args[0].toUpperCase()}** criado com sucesso!`,
+ content: `✅ ${ctx.message.author.mention} **|** Promocode **${ctx.args[0].toUpperCase()}** criado com sucesso!`,
flags: ctx.ephemeral
});
}
diff --git a/src/Commands/Developer/PromoDeleteCommand.js b/src/Commands/Developer/PromoDeleteCommand.js
index 9f4e5503..508b4401 100644
--- a/src/Commands/Developer/PromoDeleteCommand.js
+++ b/src/Commands/Developer/PromoDeleteCommand.js
@@ -47,21 +47,21 @@ module.exports = class EvalCommand {
}
async run (ctx) {
- if (!ctx.args[0]) return ctx.message.channel.slashReply(`:x: ${ctx.message.author} **|** Insira os 2 campos, \`${ctx.prefix}pcreate \``);
+ if (!ctx.args[0]) return ctx.message.channel.slashReply(`:x: ${ctx.message.author.mention} **|** Insira os 2 campos, \`${ctx.prefix}pcreate \``);
const code = await global.zuly.db.get(ctx.args[0].toUpperCase());
if (!code) {
return ctx.message.channel.slashReply({
- content: `:x: ${ctx.message.author} **|** Esse código não existe`,
+ content: `:x: ${ctx.message.author.mention} **|** Esse código não existe`,
flags: ctx.ephemeral
});
}
else {
await global.zuly.db.delete(ctx.args[0].toUpperCase());
- const channel = await global.zuly.getRESTChannel('894981159119896576');
+ const channel = await global.zuly.channels.cache.get('894981159119896576');
channel.createMessage(`<:zu_ticket:890950181120507935> <@&894983704554930247> **|** Promocode: **${ctx.args[0].toUpperCase()}** ficou invalido.`);
return ctx.message.channel.slashReply({
- content: `✅ ${ctx.message.author} **|** Promocode **${ctx.args[0].toUpperCase()}** deletado com sucesso!`,
+ content: `✅ ${ctx.message.author.mention} **|** Promocode **${ctx.args[0].toUpperCase()}** deletado com sucesso!`,
flags: ctx.ephemeral
});
}
diff --git a/src/Commands/Economy/AboutCommand.js b/src/Commands/Economy/AboutCommand.js
index 25bff3fd..74e97d43 100644
--- a/src/Commands/Economy/AboutCommand.js
+++ b/src/Commands/Economy/AboutCommand.js
@@ -49,12 +49,12 @@ module.exports = class DailyCommand {
async run (ctx) {
if (!ctx.args[0]) {
return ctx.message.channel.slashReply({
- content: `:x: ${ctx.message.author} **|** ${ctx.idioma.sobre.nada}`
+ content: `:x: ${ctx.message.author.mention} **|** ${ctx.idioma.sobre.nada}`
});
}
global.zuly.db.set(`about-${ctx.message.author.id}`, ctx.args.join(' '));
ctx.message.channel.slashReply({
- content: `:white_check_mark: ${ctx.message.author} **|** ${ctx.idioma.sobre.alt.replace('%t', ctx.args.join(' ').replace(/`/g, ''))}`
+ content: `:white_check_mark: ${ctx.message.author.mention} **|** ${ctx.idioma.sobre.alt.replace('%t', ctx.args.join(' ').replace(/`/g, ''))}`
});
}
};
diff --git a/src/Commands/Economy/BalanceCommand.js b/src/Commands/Economy/BalanceCommand.js
index d1234c49..055db908 100644
--- a/src/Commands/Economy/BalanceCommand.js
+++ b/src/Commands/Economy/BalanceCommand.js
@@ -46,10 +46,10 @@ module.exports = class DailyCommand {
embed.setTitle(`💰 Balance | ${global.zuly.user.username}`);
embed.addField(`<:zu_anime:882668160480849970> Ryos: __${user.username}#${user.discriminator}__`, `${ryos}`);
embed.setColor('#ffcbdb');
- embed.setThumbnail(global.zuly.user.avatarURL);
- embed.setFooter('⤷ zulybot.xyz', global.zuly.user.avatarURL);
+ embed.setThumbnail(global.zuly.user.displayAvatarURL({ dynamic: true, format: 'png', size: 4096 }));
+ embed.setFooter('⤷ zulybot.xyz', global.zuly.user.displayAvatarURL({ dynamic: true, format: 'png', size: 4096 }));
ctx.message.channel.slashReply({
- content: ctx.message.author,
+ content: ctx.message.author.mention,
embeds: [embed.get()]
});
}
diff --git a/src/Commands/Economy/DailyCommand.js b/src/Commands/Economy/DailyCommand.js
index 231977ad..f9d6cff7 100644
--- a/src/Commands/Economy/DailyCommand.js
+++ b/src/Commands/Economy/DailyCommand.js
@@ -52,12 +52,12 @@ module.exports = class DailyCommand {
if (daily !== null && timeout - (Date.now() - daily) > 0) {
const tt = moment(timeout - (Date.now() - daily)).format('HH:mm:ss');
ctx.message.channel.slashReply({
- content: `:x: ${ctx.message.author} **|** ${ctx.idioma.economy.jacoletou} **${tt}**`
+ content: `:x: ${ctx.message.author.mention} **|** ${ctx.idioma.economy.jacoletou} **${tt}**`
});
}
else {
ctx.message.channel.slashReply({
- content: `💸 ${ctx.message.author} **|** ${ctx.idioma.economy.recebeu} **☕ ${amount} ryos**!`
+ content: `💸 ${ctx.message.author.mention} **|** ${ctx.idioma.economy.recebeu} **☕ ${amount} ryos**!`
});
const money = global.zuly.db.get(`ryos-${ctx.message.author.id}`);
if (money) {
diff --git a/src/Commands/Economy/GenderCommand.js b/src/Commands/Economy/GenderCommand.js
index f71bd606..ffc84a0b 100644
--- a/src/Commands/Economy/GenderCommand.js
+++ b/src/Commands/Economy/GenderCommand.js
@@ -43,11 +43,11 @@ module.exports = class DailyCommand {
const embed = new ctx.embed();
embed.setTitle(`${ctx.idioma.gender.title} | ${global.zuly.user.username}`);
embed.setDescription(ctx.idioma.gender.desc.replace('%u', ctx.message.author));
- embed.setFooter('⤷ zulybot.xyz', global.zuly.user.avatarURL);
+ embed.setFooter('⤷ zulybot.xyz', global.zuly.user.displayAvatarURL({ dynamic: true, format: 'png', size: 4096 }));
embed.setColor('#ffcbdb');
- embed.setThumbnail(global.zuly.user.avatarURL);
+ embed.setThumbnail(global.zuly.user.displayAvatarURL({ dynamic: true, format: 'png', size: 4096 }));
ctx.message.channel.slashReply({
- content: ctx.message.author,
+ content: ctx.message.author.mention,
embeds: [embed.get()]
}).then(async (msg) => {
const { ReactionCollector } = require('eris-collector');
@@ -74,7 +74,7 @@ module.exports = class DailyCommand {
if (user.id !== ctx.message.author.id) return;
if (user.id === ctx.message.author.id) {
await global.zuly.db.set(`gender-${ctx.message.author.id}`, 'male');
- ctx.message.channel.slashReply(`:white_check_mark: ${ctx.message.author} **|** ${ctx.idioma.gender.change.replace('%g', ctx.idioma.gender.male)}`);
+ ctx.message.channel.slashReply(`:white_check_mark: ${ctx.message.author.mention} **|** ${ctx.idioma.gender.change.replace('%g', ctx.idioma.gender.male)}`);
// End Collectors
MeninoColetor.stop();
MeninaColetor.stop();
@@ -85,7 +85,7 @@ module.exports = class DailyCommand {
if (user.id !== ctx.message.author.id) return;
if (user.id === ctx.message.author.id) {
await global.zuly.db.set(`gender-${ctx.message.author.id}`, 'female');
- ctx.message.channel.slashReply(`:white_check_mark: ${ctx.message.author} **|** ${ctx.idioma.gender.change.replace('%g', ctx.idioma.gender.female)}`);
+ ctx.message.channel.slashReply(`:white_check_mark: ${ctx.message.author.mention} **|** ${ctx.idioma.gender.change.replace('%g', ctx.idioma.gender.female)}`);
// End Collectors
MeninoColetor.stop();
MeninaColetor.stop();
@@ -96,7 +96,7 @@ module.exports = class DailyCommand {
if (user.id !== ctx.message.author.id) return;
if (user.id === ctx.message.author.id) {
await global.zuly.db.set(`gender-${ctx.message.author.id}`, 'lgbt');
- ctx.message.channel.slashReply(`:white_check_mark: ${ctx.message.author} **|** ${ctx.idioma.gender.change.replace('%g', 'lgbt')}`);
+ ctx.message.channel.slashReply(`:white_check_mark: ${ctx.message.author.mention} **|** ${ctx.idioma.gender.change.replace('%g', 'lgbt')}`);
// End Collectors
MeninoColetor.stop();
MeninaColetor.stop();
diff --git a/src/Commands/Economy/ProfileCommand.js b/src/Commands/Economy/ProfileCommand.js
index 938caaf9..19d6a61f 100644
--- a/src/Commands/Economy/ProfileCommand.js
+++ b/src/Commands/Economy/ProfileCommand.js
@@ -54,7 +54,7 @@ module.exports = class EvalCommand {
});
const background = await loadImage('./assets/images/profile/profile.png');
const back2 = await loadImage(back);
- const avatar = await loadImage(user.avatarURL);
+ const avatar = await loadImage(user.displayAvatarURL({ dynamic: true, format: 'png', size: 4096 }));
const canvas = createCanvas(background.width, background.height);
const foto = canvas.getContext('2d');
const about = await global.zuly.db.get(`about-${user.id}`) || ctx.idioma.perfil.desc.replace('%p', ctx.prefix);
diff --git a/src/Commands/Economy/ResgatarCommand.js b/src/Commands/Economy/ResgatarCommand.js
index 49c2eee8..bbe1eaa5 100644
--- a/src/Commands/Economy/ResgatarCommand.js
+++ b/src/Commands/Economy/ResgatarCommand.js
@@ -49,20 +49,20 @@ module.exports = class ResgatarCommand {
async run (ctx) {
if (!ctx.args[0]) {
return ctx.message.channel.slashReply({
- content: `:x: ${ctx.message.author} **|** ${ctx.idioma.economy.noarg.replace('%p', ctx.prefix)}`
+ content: `:x: ${ctx.message.author.mention} **|** ${ctx.idioma.economy.noarg.replace('%p', ctx.prefix)}`
});
}
const codigo = ctx.args[0].toUpperCase();
const valor = await global.zuly.db.get(codigo);
if (!valor) {
return ctx.message.channel.slashReply({
- content: `:x: ${ctx.message.author} **|** ${ctx.idioma.economy.nocode}`
+ content: `:x: ${ctx.message.author.mention} **|** ${ctx.idioma.economy.nocode}`
});
}
else {
const resgatado = await global.zuly.db.get(`${codigo}-${ctx.message.author.id}`);
if (resgatado) {
- return ctx.message.channel.slashReply(`:x: ${ctx.message.author} **|** ${ctx.idioma.economy.resgatado}`);
+ return ctx.message.channel.slashReply(`:x: ${ctx.message.author.mention} **|** ${ctx.idioma.economy.resgatado}`);
}
else {
const ryos = await global.zuly.db.get(`ryos-${ctx.message.author.id}`);
@@ -77,10 +77,10 @@ module.exports = class ResgatarCommand {
embed.setTitle(`🎟️ Promocodes | ${global.zuly.user.username}`);
embed.setDescription(`> ${ctx.idioma.economy.sucesso.replace('%p', codigo).replace('%v', valor)}`);
embed.setColor('#ffcbdb');
- embed.setThumbnail(global.zuly.user.avatarURL);
- embed.setFooter('⤷ zulybot.xyz', global.zuly.user.avatarURL);
+ embed.setThumbnail(global.zuly.user.displayAvatarURL({ dynamic: true, format: 'png', size: 4096 }));
+ embed.setFooter('⤷ zulybot.xyz', global.zuly.user.displayAvatarURL({ dynamic: true, format: 'png', size: 4096 }));
return ctx.message.channel.slashReply({
- content: ctx.message.author,
+ content: ctx.message.author.mention,
embeds: [embed.get()]
});
}
diff --git a/src/Commands/Fun/FNShopCommand.js b/src/Commands/Fun/FNShopCommand.js
index fda54179..70bd868a 100644
--- a/src/Commands/Fun/FNShopCommand.js
+++ b/src/Commands/Fun/FNShopCommand.js
@@ -44,7 +44,7 @@ module.exports = class Nitro {
const file = await readFile('./assets/images/utils/fnshop.png');
ctx.message.channel.slashReply({
- content: ctx.message.author,
+ content: ctx.message.author.mention,
file: file,
name: 'fnshop.png'
});
diff --git a/src/Commands/Fun/GuessTheNumberCommand.js b/src/Commands/Fun/GuessTheNumberCommand.js
index 3b7ab25f..89f68ca9 100644
--- a/src/Commands/Fun/GuessTheNumberCommand.js
+++ b/src/Commands/Fun/GuessTheNumberCommand.js
@@ -2,7 +2,7 @@ module.exports = class GuessCommand {
constructor () {
return {
permissoes: {
- membro: ['manageGuild'],
+ membro: ['MANAGE_GUILD'],
bot: [],
dono: false
},
@@ -57,18 +57,18 @@ module.exports = class GuessCommand {
const number = Math.floor(Math.random() * 1500) + 500;
console.log(number);
ctx.message.channel.slashReply({
- content: `⏰ ${ctx.message.author} **|** ${ctx.idioma.guess.start.replace('%min', 500).replace('%max', 1500)}`
+ content: `⏰ ${ctx.message.author.mention} **|** ${ctx.idioma.guess.start.replace('%min', 500).replace('%max', 1500)}`
});
setTimeout(() => {
ctx.message.channel.createMessage({
- content: `✅ ${ctx.message.author} **|** ${ctx.idioma.guess.started}`
+ content: `✅ ${ctx.message.author.mention} **|** ${ctx.idioma.guess.started}`
}).then(async msg => {
const dm = await ctx.message.author.getDMChannel();
dm.createMessage({
- content: `👀 ${ctx.message.author} **|** ${ctx.idioma.guess.number.replace('%num', number)}`
+ content: `👀 ${ctx.message.author.mention} **|** ${ctx.idioma.guess.number.replace('%num', number)}`
}).catch(() => {
- ctx.message.createFollowup({
- content: `👀 ${ctx.message.author} **|** ${ctx.idioma.guess.number.replace('%num', number)}`,
+ ctx.message.channel.slashReply({
+ content: `👀 ${ctx.message.author.mention} **|** ${ctx.idioma.guess.number.replace('%num', number)}`,
flags: ctx.ephemeral
});
});
@@ -97,18 +97,18 @@ module.exports = class GuessCommand {
const number = Math.floor(Math.random() * Number(ctx.args[1])) + Number(ctx.args[0]);
console.log(number);
ctx.message.channel.slashReply({
- content: `⏰ ${ctx.message.author} **|** ${ctx.idioma.guess.start.replace('%min', Number(ctx.args[0])).replace('%max', Number(ctx.args[1]))}`
+ content: `⏰ ${ctx.message.author.mention} **|** ${ctx.idioma.guess.start.replace('%min', Number(ctx.args[0])).replace('%max', Number(ctx.args[1]))}`
});
setTimeout(() => {
ctx.message.channel.createMessage({
- content: `✅ ${ctx.message.author} **|** ${ctx.idioma.guess.started}`
+ content: `✅ ${ctx.message.author.mention} **|** ${ctx.idioma.guess.started}`
}).then(async msg => {
const dm = await ctx.message.author.getDMChannel();
dm.createMessage({
- content: `👀 ${ctx.message.author} **|** ${ctx.idioma.guess.number.replace('%num', number)}`
+ content: `👀 ${ctx.message.author.mention} **|** ${ctx.idioma.guess.number.replace('%num', number)}`
}).catch(() => {
- ctx.message.createFollowup({
- content: `👀 ${ctx.message.author} **|** ${ctx.idioma.guess.number.replace('%num', number)}`,
+ ctx.message.channel.slashReply({
+ content: `👀 ${ctx.message.author.mention} **|** ${ctx.idioma.guess.number.replace('%num', number)}`,
flags: ctx.ephemeral
});
});
diff --git a/src/Commands/Fun/NitroCommand.js b/src/Commands/Fun/NitroCommand.js
index 872467d0..97d95e35 100644
--- a/src/Commands/Fun/NitroCommand.js
+++ b/src/Commands/Fun/NitroCommand.js
@@ -41,7 +41,7 @@ module.exports = class Nitro {
async run (ctx) {
const { readFile } = require('fs/promises');
- ctx.message.channel.slashReply(`<:zu_nitro:885919779205029898> ${ctx.message.author} **|** discord\\.gift/${Math.random().toString(36).slice(-8)}`, {
+ ctx.message.channel.slashReply(`<:zu_nitro:885919779205029898> ${ctx.message.author.mention} **|** discord\\.gift/${Math.random().toString(36).slice(-8)}`, {
file: await readFile('./assets/images/memes/nitrofake.png'),
name: 'nitro.png'
});
diff --git a/src/Commands/Fun/ShipCommand.js b/src/Commands/Fun/ShipCommand.js
index 01303641..0f5651dd 100644
--- a/src/Commands/Fun/ShipCommand.js
+++ b/src/Commands/Fun/ShipCommand.js
@@ -84,8 +84,8 @@ module.exports = class ShipCommand {
const edit = createCanvas(base.width, base.height);
const foto = edit.getContext('2d');
- const avatar1 = user1.avatarURL;
- const avatar2 = user2.avatarURL;
+ const avatar1 = user1displayAvatarURL({ dynamic: true, format: 'png', size: 4096 });
+ const avatar2 = user2displayAvatarURL({ dynamic: true, format: 'png', size: 4096 });
const img1 = await loadImage(avatar1);
const img2 = await loadImage(avatar2);
@@ -101,7 +101,7 @@ module.exports = class ShipCommand {
foto.font = '300px Lemon-Brownies';
foto.fillText(`${nome}`, 2000, 2000);
- ctx.message.channel.slashReply(`💖 ${ctx.message.author} 💖`, {
+ ctx.message.channel.slashReply(`💖 ${ctx.message.author.mention} 💖`, {
file: edit.toBuffer(),
name: 'ship.png'
}).then(async () => {
diff --git a/src/Commands/Fun/VascoCommand.js b/src/Commands/Fun/VascoCommand.js
index c14d481c..98161916 100644
--- a/src/Commands/Fun/VascoCommand.js
+++ b/src/Commands/Fun/VascoCommand.js
@@ -58,8 +58,8 @@ module.exports = class MrincredibleCommand {
const canvas = createCanvas(vasco.width, vasco.height);
const foto = canvas.getContext('2d');
- const user = ctx.args[0] ? ctx.messages[0] || await global.zuly.users.fetch(ctx.args[0]).catch(() => ctx.message.author) : ctx.message.author;
- const avatar = await loadImage(user.avatarURL);
+ const user = await global.zuly.users.fetch(ctx.args[0]).catch(() => ctx.message.author) || ctx.message.author;
+ const avatar = await loadImage(user.displayAvatarURL({ dynamic: true, format: 'png', size: 4096 }));
foto.drawImage(avatar, 460, 250, 150, 160);
foto.drawImage(vasco, 0, 0, canvas.width, canvas.height);
diff --git a/src/Commands/Giveaways/giveaway-end.js b/src/Commands/Giveaways/giveaway-end.js
index 659d577c..e7e34770 100644
--- a/src/Commands/Giveaways/giveaway-end.js
+++ b/src/Commands/Giveaways/giveaway-end.js
@@ -2,7 +2,7 @@ module.exports = class GivawayStart {
constructor () {
return {
permissoes: {
- membro: ['manageGuild'],
+ membro: ['MANAGE_GUILD'],
bot: ['embedLinks'],
dono: false
},
@@ -49,11 +49,11 @@ module.exports = class GivawayStart {
async run (ctx) {
if (!ctx.args[0]) {
return ctx.message.channel.slashReply({
- content: `:x: ${ctx.message.author} **|** ${ctx.idioma.giveaway.end.replace('%p', ctx.prefix)}`
+ content: `:x: ${ctx.message.author.mention} **|** ${ctx.idioma.giveaway.end.replace('%p', ctx.prefix)}`
});
}
ctx.message.channel.slashReply({
- content: `🎁 ${ctx.message.author} **|** Sucess!`
+ content: `🎁 ${ctx.message.author.mention} **|** Sucess!`
});
global.zuly.giveawaysManager.end(ctx.args[0]);
}
diff --git a/src/Commands/Giveaways/giveaway-reroll.js b/src/Commands/Giveaways/giveaway-reroll.js
index 717d0802..88edd752 100644
--- a/src/Commands/Giveaways/giveaway-reroll.js
+++ b/src/Commands/Giveaways/giveaway-reroll.js
@@ -2,7 +2,7 @@ module.exports = class GivawayStart {
constructor () {
return {
permissoes: {
- membro: ['manageGuild'],
+ membro: ['MANAGE_GUILD'],
bot: ['embedLinks'],
dono: false
},
@@ -49,11 +49,11 @@ module.exports = class GivawayStart {
async run (ctx) {
if (!ctx.args[0]) {
return ctx.message.channel.slashReply({
- content: `:x: ${ctx.message.author} **|** ${ctx.idioma.giveaway.reroll.replace('%p', ctx.prefix)}`
+ content: `:x: ${ctx.message.author.mention} **|** ${ctx.idioma.giveaway.reroll.replace('%p', ctx.prefix)}`
});
}
ctx.message.channel.slashReply({
- content: `🎁 ${ctx.message.author} **|** Sucess!`
+ content: `🎁 ${ctx.message.author.mention} **|** Sucess!`
});
global.zuly.giveawaysManager.reroll(ctx.args[0], {
messages: {
diff --git a/src/Commands/Giveaways/giveaway-start.js b/src/Commands/Giveaways/giveaway-start.js
index f24cd07e..5f5f175d 100644
--- a/src/Commands/Giveaways/giveaway-start.js
+++ b/src/Commands/Giveaways/giveaway-start.js
@@ -2,7 +2,7 @@ module.exports = class GivawayStart {
constructor () {
return {
permissoes: {
- membro: ['manageGuild'],
+ membro: ['MANAGE_GUILD'],
bot: ['embedLinks'],
dono: false
},
@@ -62,19 +62,19 @@ module.exports = class GivawayStart {
const ms = require('ms');
if (!ctx.args[0] || !ctx.args[1] || !ctx.args[2]) {
return ctx.message.channel.slashReply({
- content: `:x: ${ctx.message.author} **|** ${ctx.idioma.giveaway.start.replace('%p', ctx.prefix)}`
+ content: `:x: ${ctx.message.author.mention} **|** ${ctx.idioma.giveaway.start.replace('%p', ctx.prefix)}`
});
}
ctx.message.channel.slashReply({
- content: `🎁 ${ctx.message.author} **|** Sucess!`
+ content: `🎁 ${ctx.message.author.mention} **|** Sucess!`
});
global.zuly.giveawaysManager.start(ctx.message.channel, {
- time: ms(ctx.args[0]),
+ duration: ms(ctx.args[0]),
winnerCount: parseInt(ctx.args[1]),
prize: ctx.args.slice(2).join(' '),
messages: {
inviteToParticipate: ctx.idioma.giveaway.addReaction,
- timeRemaining: `${ctx.idioma.giveaway.restante} **{duration}**`,
+ drawing: `${ctx.idioma.giveaway.restante} **{timestamp}**`,
winMessage: '🎁 ' + ctx.idioma.giveaway.wins,
noWinner: ctx.idioma.giveaway.no,
winners: ctx.idioma.giveaway.win,
diff --git a/src/Commands/Info/BotinfoCommand.js b/src/Commands/Info/BotinfoCommand.js
index 771a2a7c..5bc1a3f2 100644
--- a/src/Commands/Info/BotinfoCommand.js
+++ b/src/Commands/Info/BotinfoCommand.js
@@ -59,13 +59,13 @@ module.exports = class BotinfoCommand {
cpuUsage(function(v) {
const embed = new ctx.embed();
embed.setTitle(`🤖 Botinfo | ${global.zuly.user.username}`);
- embed.setThumbnail(global.zuly.user.avatarURL);
+ embed.setThumbnail(global.zuly.user.displayAvatarURL({ dynamic: true, format: 'png', size: 4096 }));
embed.setDescription(ctx.idioma.botinfo.texto.replace('%bot', global.zuly.user.username).replace('%g', totalGuilds).replace('%devs', devs.join(', ')).replace('%u', totalUsers.toLocaleString().replace('.', ',')));
embed.addField(`<:zu_ram:889942152736555108> ${ctx.idioma.botinfo.recursos}`, `**Ram:** ${(process.memoryUsage().rss / 1024 / 1024).toFixed(0) + 'mb'} / ${(os.totalmem() / 1024 / 1024).toFixed(0) + 'mb'}\n**CPU:** ${v.toFixed(2)}%\n**Uptime:** ${uptime}`);
embed.setColor('#ffcbdb');
- embed.setFooter(`⤷ zulybot.xyz, ${ctx.idioma.botinfo.mem.replace('%m', (process.memoryUsage().rss / 1024 / 1024 / totalGuilds).toFixed(2) + 'kb')}`, global.zuly.user.avatarURL);
+ embed.setFooter(`⤷ zulybot.xyz, ${ctx.idioma.botinfo.mem.replace('%m', (process.memoryUsage().rss / 1024 / 1024 / totalGuilds).toFixed(2) + 'kb')}`, global.zuly.user.displayAvatarURL({ dynamic: true, format: 'png', size: 4096 }));
ctx.message.channel.slashReply({
- content: ctx.message.author,
+ content: ctx.message.author.mention,
embeds: [embed.get()],
components: [
{
diff --git a/src/Commands/Info/HelpCommand.js b/src/Commands/Info/HelpCommand.js
index 54b8bb39..65ae2c28 100644
--- a/src/Commands/Info/HelpCommand.js
+++ b/src/Commands/Info/HelpCommand.js
@@ -74,19 +74,19 @@ module.exports = class Ajuda {
if (ctx.args[0]) {
const cmd = await global.zuly.commands.get(ctx.args[0]) || global.zuly.commands.find(cmd => cmd.aliases.includes(ctx.args[0]));
- if (!cmd) return ctx.message.channel.slashReply(`:x: ${ctx.message.author} **|** Esse comando não existe`);
+ if (!cmd) return ctx.message.channel.slashReply(`:x: ${ctx.message.author.mention} **|** Esse comando não existe`);
const help = new ctx.embed();
help.setTitle('<:zu_info:880812942713573396> ' + `Informações do comando: \`${ctx.prefix}${cmd.pt.nome.toLowerCase()}\``);
help.addField('📚 Descrição:', `\`${cmd.pt.desc}\``, false);
help.addField(':small_blue_diamond: Permissões do bot:', `\`${cmd.permissoes.bot.join('`, `') || 'Esse comando não necessita de permissões'}\``, false);
help.addField(':small_orange_diamond: Permissões do usuário:', `\`${cmd.permissoes.membro.join('`, `') || 'Esse comando não necessita de permissões especiais para ser executado'}\``, false);
- help.setThumbnail(global.zuly.user.avatarURL);
+ help.setThumbnail(global.zuly.user.displayAvatarURL({ dynamic: true, format: 'png', size: 4096 }));
help.setColor('#ffcbdb');
- help.setFooter('⤷ zulybot.xyz', global.zuly.user.avatarURL);
+ help.setFooter('⤷ zulybot.xyz', global.zuly.user.displayAvatarURL({ dynamic: true, format: 'png', size: 4096 }));
return ctx.message.channel.slashReply({
- content: ctx.message.author,
+ content: ctx.message.author.mention,
embeds: [help.get()],
components: [
{
@@ -133,18 +133,18 @@ module.exports = class Ajuda {
);
});
embed.setDescription(`>>> Olá, meu nome é: **${global.zuly.user.username}**!\nAtualmente possuo: **${global.zuly.commands.size}** comandos;\nMe [adicione](https://discord.com/oauth2/authorize?client_id=880173509077266483&scope=bot%20applications.commands&permissions=805432446), ou se junte ao meu [suporte](https://discord.gg/pyyyJpw5QW) caso queira!\n↳ [Ei, que tal dar uma passadinha na Twitch do meu amigo Lucaas?](https://www.twitch.tv/lucaas0007)`);
- embed.setThumbnail(global.zuly.user.avatarURL);
+ embed.setThumbnail(global.zuly.user.displayAvatarURL({ dynamic: true, format: 'png', size: 4096 }));
for (const categoria in categorias) {
embed.addField(categoria + ` [${categorias[categoria].length}]`, `${categorias[categoria].join(', ') || '⠀'}`);
}
if (!ctx.message.channel.nsfw) {
- embed.setFooter('⤷ zulybot.xyz | ' + ctx.idioma.help.nsfw + ctx.idioma.help.creators + devs.join(', '), global.zuly.user.avatarURL);
+ embed.setFooter('⤷ zulybot.xyz | ' + ctx.idioma.help.nsfw + ctx.idioma.help.creators + devs.join(', '), global.zuly.user.displayAvatarURL({ dynamic: true, format: 'png', size: 4096 }));
}
else {
- embed.setFooter('⤷ zulybot.xyz | ' + ctx.idioma.help.creators + devs.join(', '), global.zuly.user.avatarURL);
+ embed.setFooter('⤷ zulybot.xyz | ' + ctx.idioma.help.creators + devs.join(', '), global.zuly.user.displayAvatarURL({ dynamic: true, format: 'png', size: 4096 }));
}
ctx.message.channel.slashReply({
- content: ctx.message.author,
+ content: ctx.message.author.mention,
embeds: [embed.get()],
components: [
{
@@ -178,18 +178,18 @@ module.exports = class Ajuda {
case 'fr-fr':
if (ctx.args[0]) {
const cmd = await global.zuly.commands.get(ctx.args[0]) || global.zuly.commands.find(cmd => cmd.aliases.includes(ctx.args[0]));
- if (!cmd) return ctx.message.channel.slashReply(`:x: ${ctx.message.author} **|** Esse comando não existe`);
+ if (!cmd) return ctx.message.channel.slashReply(`:x: ${ctx.message.author.mention} **|** Esse comando não existe`);
const help = new ctx.embed();
help.setTitle('<:zu_info:880812942713573396> ' + `Infos commande: \`${ctx.prefix}${cmd.pt.nome.toLowerCase()}\``);
help.addField('📚 La description:', `\`${cmd.fr.desc}\``, false);
help.addField(':small_blue_diamond: Autorisations des robots:', `\`${cmd.permissoes.bot.join('`, `') || 'Cette commande n\'a pas besoin d\'autorisations.'}\``, false);
help.addField(':small_orange_diamond: Autorisations utilisateur:', `\`${cmd.permissoes.membro.join('`, `') || 'Cette commande n\'a pas besoin d\'autorisations spéciales pour s\'exécuter.'}\``, false);
- help.setThumbnail(global.zuly.user.avatarURL);
+ help.setThumbnail(global.zuly.user.displayAvatarURL({ dynamic: true, format: 'png', size: 4096 }));
help.setColor('#ffcbdb');
- help.setFooter('⤷ zulybot.xyz', global.zuly.user.avatarURL);
+ help.setFooter('⤷ zulybot.xyz', global.zuly.user.displayAvatarURL({ dynamic: true, format: 'png', size: 4096 }));
return ctx.message.channel.slashReply({
- content: ctx.message.author,
+ content: ctx.message.author.mention,
embeds: [help.get()],
components: [
{
@@ -236,18 +236,18 @@ module.exports = class Ajuda {
);
});
embed.setDescription(`>>> Bonjour, mon nom est: **${global.zuly.user.username}**!\nJ'ai actuellement: **${global.zuly.commands.size}** commandes;\nAjoute [moi](https://discord.com/oauth2/authorize?client_id=880173509077266483&scope=bot%20applications.commands&permissions=805432446), ou rejoignez mon [soutien](https://discord.gg/pyyyJpw5QW) si tu veux!\n↳ [Hé, que diriez-vous de jeter un œil au Twitch de mon ami Lucaas?](https://www.twitch.tv/lucaas0007)`);
- embed.setThumbnail(global.zuly.user.avatarURL);
+ embed.setThumbnail(global.zuly.user.displayAvatarURL({ dynamic: true, format: 'png', size: 4096 }));
for (const categoria in categorias) {
embed.addField(categoria + ` [${categorias[categoria].length}]`, `${categorias[categoria].join(', ') || '⠀'}`);
}
if (!ctx.message.channel.nsfw) {
- embed.setFooter('⤷ zulybot.xyz | ' + ctx.idioma.help.nsfw + ctx.idioma.help.creators + devs.join(', '), global.zuly.user.avatarURL);
+ embed.setFooter('⤷ zulybot.xyz | ' + ctx.idioma.help.nsfw + ctx.idioma.help.creators + devs.join(', '), global.zuly.user.displayAvatarURL({ dynamic: true, format: 'png', size: 4096 }));
}
else {
- embed.setFooter('⤷ zulybot.xyz | ' + ctx.idioma.help.creators + devs.join(', '), global.zuly.user.avatarURL);
+ embed.setFooter('⤷ zulybot.xyz | ' + ctx.idioma.help.creators + devs.join(', '), global.zuly.user.displayAvatarURL({ dynamic: true, format: 'png', size: 4096 }));
}
ctx.message.channel.slashReply({
- content: ctx.message.author,
+ content: ctx.message.author.mention,
embeds: [embed.get()],
components: [
{
@@ -281,19 +281,19 @@ module.exports = class Ajuda {
if (ctx.args[0]) {
const cmd = await global.zuly.commands.get(ctx.args[0]) || global.zuly.commands.find(cmd => cmd.aliases.includes(ctx.args[0]));
- if (!cmd) return ctx.message.channel.slashReply(`:x: ${ctx.message.author} **|** This command does not exist`);
+ if (!cmd) return ctx.message.channel.slashReply(`:x: ${ctx.message.author.mention} **|** This command does not exist`);
const help = new ctx.embed();
help.setTitle('<:zu_info:880812942713573396> ' + `Command information: \`${ctx.prefix}${cmd.pt.nome.toLowerCase()}\``);
help.addField('📚 Description:', `\`${cmd.en.desc}\``, false);
help.addField(':small_blue_diamond: Bot permissions:', `\`${cmd.permissoes.bot.join('`, `') || 'This command does not need permissions.'}\``, false);
help.addField(':small_orange_diamond: User permissions:', `\`${cmd.permissoes.membro.join('`, `') || 'This command does not need special permissions to run'}\``, false);
- help.setThumbnail(global.zuly.user.avatarURL);
+ help.setThumbnail(global.zuly.user.displayAvatarURL({ dynamic: true, format: 'png', size: 4096 }));
help.setColor('#ffcbdb');
- help.setFooter('⤷ zulybot.xyz', global.zuly.user.avatarURL);
+ help.setFooter('⤷ zulybot.xyz', global.zuly.user.displayAvatarURL({ dynamic: true, format: 'png', size: 4096 }));
return ctx.message.channel.slashReply({
- content: ctx.message.author,
+ content: ctx.message.author.mention,
embeds: [help.get()],
flags: ctx.ephemeral
});
@@ -314,19 +314,19 @@ module.exports = class Ajuda {
categorias[cmd.en.categoria].push(`\`${cmd.en.nome}\``);
});
embed.setDescription(`>>> Hi, my name is: **${global.zuly.user.username}**!\nI currently have: **${global.zuly.commands.size}** commands;\nMe [add](https://discord.com/oauth2/authorize?client_id=719524114536333342&scope=bot%20applications.commands&permissions=805432446), or join my [support](https://discord.gg/pyyyJpw5QW) if you want!\n↳ [Ei, que tal dar uma passadinha na Twitch do meu amigo Lucaas?](https://www.twitch.tv/lucaas0007)`);
- embed.setThumbnail(global.zuly.user.avatarURL);
+ embed.setThumbnail(global.zuly.user.displayAvatarURL({ dynamic: true, format: 'png', size: 4096 }));
for (const categoria in categorias) {
embed.addField(categoria + ` [${categorias[categoria].length}]`, `${categorias[categoria].join(', ') || '⠀'}`);
}
if (!ctx.message.channel.nsfw) {
- embed.setFooter(`⤷ https://zulybot.xyz | ${ctx.idioma.help.nsfw} ${ctx.idioma.help.nsfw} ${ctx.idioma.help.creators} ${ctx.idioma.help.nsfw} ${ctx.idioma.help.creators} ${devs.join(', ')}`, global.zuly.user.avatarURL);
+ embed.setFooter(`⤷ https://zulybot.xyz | ${ctx.idioma.help.nsfw} ${ctx.idioma.help.nsfw} ${ctx.idioma.help.creators} ${ctx.idioma.help.nsfw} ${ctx.idioma.help.creators} ${devs.join(', ')}`, global.zuly.user.displayAvatarURL({ dynamic: true, format: 'png', size: 4096 }));
}
else {
- embed.setFooter(`⤷ https://zulybot.xyz | ${ctx.idioma.help.creators} ${devs.join(', ')}`, global.zuly.user.avatarURL);
+ embed.setFooter(`⤷ https://zulybot.xyz | ${ctx.idioma.help.creators} ${devs.join(', ')}`, global.zuly.user.displayAvatarURL({ dynamic: true, format: 'png', size: 4096 }));
}
ctx.message.channel.slashReply({
- content: ctx.message.author,
+ content: ctx.message.author.mention,
embeds: [embed.get()],
components: [
{
diff --git a/src/Commands/Info/HostCommand.js b/src/Commands/Info/HostCommand.js
index 8c353c23..eacb8e7d 100644
--- a/src/Commands/Info/HostCommand.js
+++ b/src/Commands/Info/HostCommand.js
@@ -46,10 +46,10 @@ module.exports = class HostCommand {
embed.addField('<:zu_database:880537804046762054> Database:', ctx.idioma.host.db);
embed.addField('💻 VPS:', ctx.idioma.host.vps);
embed.setColor('#ffcbdb');
- embed.setThumbnail(global.zuly.user.avatarURL);
- embed.setFooter('⤷ zulybot.xyz', global.zuly.user.avatarURL);
+ embed.setThumbnail(global.zuly.user.displayAvatarURL({ dynamic: true, format: 'png', size: 4096 }));
+ embed.setFooter('⤷ zulybot.xyz', global.zuly.user.displayAvatarURL({ dynamic: true, format: 'png', size: 4096 }));
ctx.message.channel.slashReply({
- content: ctx.message.author,
+ content: ctx.message.author.mention,
embeds: [embed.get()]
});
}
diff --git a/src/Commands/Info/PingCommand.js b/src/Commands/Info/PingCommand.js
index b45241d1..d16195e0 100644
--- a/src/Commands/Info/PingCommand.js
+++ b/src/Commands/Info/PingCommand.js
@@ -67,10 +67,10 @@ module.exports = class PingCommand {
embed.setDescription(`${ctx.idioma.clusters.desc.replace('%id', cluster.id).replace('%name', cluster.nome).replace('%ping', global.zuly.shards.random().latency + 'ms')}`);
embed.addField(ctx.idioma.clusters.field, `\`\`\`${ctx.idioma.clusters.fielDesc.replace('%id', cluster.id).replace('%name', cluster.nome).replace('%p', global.zuly.shards.random().latency + 'ms').replace('%pd', await pingDB + 'ms').replace('%ram', (process.memoryUsage().rss / 1024 / 1024).toFixed(0) + 'mb')}\`\`\``);
embed.setColor('#ffcbdb');
- embed.setThumbnail(global.zuly.user.avatarURL);
- embed.setFooter('⤷ zulybot.xyz', global.zuly.user.avatarURL);
+ embed.setThumbnail(global.zuly.user.displayAvatarURL({ dynamic: true, format: 'png', size: 4096 }));
+ embed.setFooter('⤷ zulybot.xyz', global.zuly.user.displayAvatarURL({ dynamic: true, format: 'png', size: 4096 }));
ctx.message.channel.slashReply({
- content: ctx.message.author,
+ content: ctx.message.author.mention,
embeds: [embed.get()]
});
}
@@ -82,7 +82,7 @@ module.exports = class PingCommand {
mongoose.connection.db.admin().ping(() => r(Date.now() - date))
);
return ctx.message.channel.slashReply({
- content: `🏓 **|** ${ctx.message.author} Pong!\n- **API Ping:** \`${global.zuly.shards.random().latency}ms\`\n- **Database:** \`${await pingDB}ms\`\n- **Cluster:** \`(${cluster.id} ${cluster.nome})\``,
+ content: `🏓 **|** ${ctx.message.author.mention} Pong!\n- **API Ping:** \`${global.zuly.shards.random().latency}ms\`\n- **Database:** \`${await pingDB}ms\`\n- **Cluster:** \`(${cluster.id} ${cluster.nome})\``,
});
}
}
diff --git a/src/Commands/Moderation/BackupCommand.js b/src/Commands/Moderation/BackupCommand.js
index 3a2e02e8..61be5199 100644
--- a/src/Commands/Moderation/BackupCommand.js
+++ b/src/Commands/Moderation/BackupCommand.js
@@ -1,11 +1,14 @@
/* eslint-disable no-unused-vars */
+
+const { client } = require('../../Config/config');
+
/* eslint-disable no-undef */
module.exports = class BackupCommand {
constructor () {
return {
permissoes: {
- membro: ['administrator'],
- bot: ['administrator'],
+ membro: ['ADMINISTRATOR'],
+ bot: ['ADMINISTRATOR'],
dono: true
},
pt: {
@@ -74,80 +77,29 @@ module.exports = class BackupCommand {
async run (ctx) {
const genID = await Math.random().toString(36).slice(2, 10);
- const nodeFetch = require('node-fetch');
if (ctx.args[0] === 'create') {
- const canais = [];
- ctx.message.guild.channels.forEach(async (channel) => {
- let parent = {};
- if (channel.parentID) {
- const canal = await global.zuly.getRESTChannel(channel.parentID);
- parent.name = canal.name;
+ global.zuly.backup.create(ctx.message.guild, {
+ maxMessagesPerChannel: 0,
+ saveImages: 'base64'
+ }).then(async (backupData) => {
+ await global.zuly.db.set(`backups.${genID}`, backupData.id);
+ const backupdb = await global.zuly.db.get(`backups.${ctx.message.author.id}`);
+ if (backupdb) {
+ await global.zuly.db.push(`backups.${ctx.message.author.id}`, genID);
}
- canais.push({
- id: channel.id,
- name: channel.name,
- type: Number(channel.type),
- position: Number(channel.position),
- topic: channel.topic,
- nsfw: channel.nsfw,
- parent: parent.name || '',
- rateLimitPerUser: Number(channel.rateLimitPerUser) || 0,
- });
- });
- setTimeout(async () => {
- await global.zuly.db.set(`backups.${genID}.channels`, canais);
- }, 5000);
- const cargos = [];
- ctx.message.guild.roles.forEach((role) => {
- if (role.managed) return;
- cargos.push({
- id: Number(role.id),
- name: role.name,
- hoist: role.hoist,
- color: Number(role.color),
- position: Number(role.position),
- mentionable: roleable,
- });
- });
- await global.zuly.db.set(`backups.${genID}.roles`, cargos);
- const guild = {};
- guild.id = ctx.message.guild.id;
- guild.backup = genID;
- guild.name = ctx.message.guild.name;
- guild.icon = (await nodeFetch(ctx.message.guild.iconURL).then((res) => res.buffer())).toString('base64');
- guild.preferredLocale = ctx.message.guild.preferredLocale;
- guild.verificationLevel = ctx.message.guild.verificationLevel;
- guild.afkTimeout = ctx.message.guild.afkTimeout;
- guild.mfaLevel = ctx.message.guild.mfaLevel;
- guild.splash = ctx.message.guild.splash;
- guild.welcomeScreen = ctx.message.guild.welcomeScreen;
- guild.widgetEnabled = ctx.message.guild.widgetEnabled;
- /*
- for(const key of Object.keys(ctx.message.guild)) {
- guild[key] = ctx.message.guild[key];
+ else {
+ await global.zuly.db.set(`backups.${ctx.message.author.id}`, [genID]);
}
- */
- setTimeout(async () => {
- await global.zuly.db.set(`backups.${genID}.guild`, guild);
- }, 3000);
- const backupdb = await global.zuly.db.get(`backups.${ctx.message.author.id}`);
- if (backupdb) {
- await global.zuly.db.push(`backups.${ctx.message.author.id}`, genID);
- }
- else {
- await global.zuly.db.set(`backups.${ctx.message.author.id}`, [genID]);
- }
- setTimeout(() => {
ctx.message.channel.slashReply({
- content: `:white_check_mark: ${ctx.message.author} **|** Backup criado, ID: \`${genID}\`.`,
+ content: `:white_check_mark: ${ctx.message.author.mention} **|** Backup criado, ID: \`${genID}\`.`,
});
- }, 5000);
+ });
}
if (ctx.args[0] === 'list') {
const backupdb = await global.zuly.db.get(`backups.${ctx.message.author.id}`);
if (!backupdb || !backupdb.length) {
return ctx.message.channel.slashReply({
- content: `:x: ${ctx.message.author} **|** Você não possui backups.`,
+ content: `:x: ${ctx.message.author.mention} **|** Você não possui backups.`,
});
}
else {
@@ -156,125 +108,52 @@ module.exports = class BackupCommand {
embed.setTitle(`☁️ Backups | ${global.zuly.user.username}`);
try {
backupdb.map(async (back) => {
- const guild = await global.zuly.db.get(`backups.${back}.guild`);
- await embed.addField(`Backup ID: ${guild.backup}`, `↳ **${guild.name}**\n↳ \`/backup load ${guild.backup}\``);
+ const backa = await global.zuly.db.get(`backups.${back}`);
+ await global.zuly.backup.fetch(backa).then((backup) => {
+ embed.addField(`Backup ID: ${back}`, `↳ **${backup.data.name}**\n↳ \`/backup load ${back}\``);
+ });
});
}
catch (e) {
console.log(e);
}
embed.setColor('#ffcbdb');
- embed.setThumbnail(global.zuly.user.avatarURL);
- embed.setFooter('⤷ zulybot.xyz', global.zuly.user.avatarURL);
+ embed.setThumbnail(global.zuly.user.displayAvatarURL({ dynamic: true, format: 'png', size: 4096 }));
+ embed.setFooter('⤷ zulybot.xyz', global.zuly.user.displayAvatarURL({ dynamic: true, format: 'png', size: 4096 }));
setTimeout(() => {
ctx.message.channel.slashReply({
- content: ctx.message.author,
+ content: ctx.message.author.mention,
embeds: [embed.get()],
});
}, 3000);
}
}
if (ctx.args[0] === 'load') {
- if (!ctx.args[1]) return ctx.message.channel.slashReply(`:x: ${ctx.message.author} **|** Insira o ID do backup após o comando, caso não saiba, use \`/backup list\`.`);
+ if (!ctx.args[1]) return ctx.message.channel.slashReply(`:x: ${ctx.message.author.mention} **|** Insira o ID do backup após o comando, caso não saiba, use \`/backup list\`.`);
const backupdb = await global.zuly.db.get(`backups.${ctx.message.author.id}`);
- if (!backupdb.includes(ctx.args[1])) return ctx.message.channel.slashReply(`:x: ${ctx.message.author} **|** Você não possui o backup com o ID \`${ctx.args[1]}\`.`);
- const msg = await ctx.message.channel.slashReply(`⚠️ ${ctx.message.author} **|** Você deseja carregar o backup? Saiba que todas as suas configurações serão substituidas pelo backup, não será recuperado **mensagens, cargos & canais** depois desse processo.\n> Para carregar reaja com \`✅\`.`);
- const { ReactionCollector } = require('eris-collector');
- msg.addReaction('✅');
- let filter = (m, emoji) => emoji.name === '✅';
- let collector = new ReactionCollector(global.zuly, msg, filter, {
- time: 30000
- });
- collector.on('collect', async (m, reaction, user) => {
+ if (!backupdb.includes(ctx.args[1])) return ctx.message.channel.slashReply(`:x: ${ctx.message.author.mention} **|** Você não possui o backup com o ID \`${ctx.args[1]}\`.`);
+ const msg = await ctx.message.channel.slashReply(`⚠️ ${ctx.message.author.mention} **|** Você deseja carregar o backup? Saiba que todas as suas configurações serão substituidas pelo backup, não será recuperado **mensagens, cargos & canais** depois desse processo.\n> Para carregar reaja com \`✅\`.`);
+ const { ReactionCollector } = require('discord.js');
+ msg.react('✅');
+ let collector = new ReactionCollector(msg);
+ collector.on('collect', async (reaction, user) => {
+ console.log(reaction.emoji.name);
if (user.id !== ctx.message.author.id) return;
if (user.id === ctx.message.author.id) {
- m.delete();
- const guild = await global.zuly.db.get(`backups.${ctx.args[1]}.guild`);
- const roles = await global.zuly.db.get(`backups.${ctx.args[1]}.roles`);
- const channels = await global.zuly.db.get(`backups.${ctx.args[1]}.channels`);
- const currentGuild = ctx.message.guild;
- // Setando servidor para status de load:
- currentGuild.edit({
- name: `Loading Backup | ${global.zuly.user.username}...`,
- reason: 'Backup',
+ msg.delete();
+ const back = await global.zuly.db.get(`backups.${ctx.args[1]}`);
+ global.zuly.backup.load(back, ctx.message.guild, {
+ clearGuildBeforeRestore: true
});
- // Deletando Canais
- currentGuild.channels.forEach((channel) => {
- channel.delete({
- reason: 'Backup',
- }).catch((e) => {
- console.log(e);
- });
- });
- // Deletando Cargos
- currentGuild.roles.forEach((role) => {
- if (role.managed) return;
- role.delete().catch((e) => {
- console.log(e);
- });
- });
-
- setTimeout(async () => {
- // Criando Cargos
- const cargosFoda = roles.sort((a, b) => a.position + b.position);
- for (const role of cargosFoda) {
- currentGuild.createRole({
- name: role.name,
- color: role.color,
- permissions: role.permissions || 0,
- mentionable: roleable,
- hoist: role.hoist,
- position: role.position,
- }).catch(() => {
-
- });
- }
- // Criando Canais
- const canaisFoda = channels.sort((a, b) => a.type + b.type);
- for (const canal of canaisFoda) {
- setTimeout(async () => {
- let parentID;
- let parent;
- if (ctx.message.guild.channels) {
- parent = await ctx.message.guild.channels.find(c => c.name === canal.parent);
- parentID = parent ? parent.id : null;
- }
- console.log(parent);
- currentGuild.createChannel(canal.name, canal.type, {
- parentID: parentID || null,
- position: canal.position,
- topic: canal.topic,
- }).catch((e) => {
- console.log(e);
- });
- }, 300);
- }
- // Editando Servidor
- const guildIcon = await Buffer.from(guild.icon, 'base64');
- setTimeout(async () => {
- await currentGuild.edit({
- name: guild.name,
- icon: guildIcon,
- preferredLocale: guild.preferredLocale,
- verificationLevel: guild.verificationLevel,
- afkTimeout: guild.afkTimeout,
- mfaLevel: guild.mfaLevel,
- splash: guild.splash,
- welcomeScreen: guild.welcomeScreen,
- widgetEnabled: guild.widgetEnabled,
- }, 'Backup | Zuly');
- }, 3000);
- }, 5000);
}
});
}
if (ctx.args[0] === 'delete') {
- if (!ctx.args[1]) return ctx.message.channel.slashReply(`:x: ${ctx.message.author} **|** Insira o ID do backup após o comando, caso não saiba, use \`/backup list\`.`);
- await global.zuly.db.remove(`backups.${ctx.args[1]}.guild`);
- await global.zuly.db.remove(`backups.${ctx.args[1]}.roles`);
- await global.zuly.db.remove(`backups.${ctx.args[1]}.channels`);
+ if (!ctx.args[1]) return ctx.message.channel.slashReply(`:x: ${ctx.message.author.mention} **|** Insira o ID do backup após o comando, caso não saiba, use \`/backup list\`.`);
await global.zuly.db.pull(`backups.${ctx.message.author.id}`, ctx.args[1]);
- return ctx.message.channel.slashReply(`:white_check_mark: ${ctx.message.author} **|** Backup \`${ctx.args[1]}\` deletado com sucesso.`);
+ const backupID = await global.zuly.db.get('backups.' + ctx.args[1]);
+ await global.zuly.backup.remove(backupID);
+ return ctx.message.channel.slashReply(`:white_check_mark: ${ctx.message.author.mention} **|** Backup \`${ctx.args[1]}\` deletado com sucesso.`);
}
}
};
diff --git a/src/Commands/Moderation/BanCommand.js b/src/Commands/Moderation/BanCommand.js
index 2d0fa664..75642692 100644
--- a/src/Commands/Moderation/BanCommand.js
+++ b/src/Commands/Moderation/BanCommand.js
@@ -2,8 +2,8 @@ module.exports = class BanCommand {
constructor () {
return {
permissoes: {
- membro: ['banMembers'],
- bot: ['banMembers'],
+ membro: ['BAN_MEMBERS'],
+ bot: ['BAN_MEMBERS'],
dono: false
},
pt: {
@@ -62,14 +62,14 @@ module.exports = class BanCommand {
let member;
if (!ctx.args[0]) {
return ctx.message.channel.slashReply({
- content: `:x: ${ctx.message.author} **|** ${ctx.idioma.ban.noarg}`
+ content: `:x: ${ctx.message.author.mention} **|** ${ctx.idioma.ban.noarg}`
});
}
if (!ctx.messages[0]) {
member = await global.zuly.users.fetch(ctx.args[0]).then(info => info).catch(() => {
return ctx.message.channel.slashReply({
- content: `:x: ${ctx.message.author} **|** Usuário desconhecido.`
+ content: `:x: ${ctx.message.author.mention} **|** Usuário desconhecido.`
});
});
}
@@ -86,7 +86,7 @@ module.exports = class BanCommand {
ctx.message.guild.banMember(member.id, 7, motivo);
ctx.message.channel.slashReply({
- content: `:white_check_mark: ${ctx.message.author} **|** ${ctx.idioma.ban.the} **${member.username}** ${ctx.idioma.ban.foi}`
+ content: `:white_check_mark: ${ctx.message.author.mention} **|** ${ctx.idioma.ban.the} **${member.username}** ${ctx.idioma.ban.foi}`
});
}
};
diff --git a/src/Commands/Moderation/BaninfoCommand.js b/src/Commands/Moderation/BaninfoCommand.js
index 423af8c7..b0389e30 100644
--- a/src/Commands/Moderation/BaninfoCommand.js
+++ b/src/Commands/Moderation/BaninfoCommand.js
@@ -2,8 +2,8 @@ module.exports = class BaninfoCommand {
constructor () {
return {
permissoes: {
- membro: ['banMembers'],
- bot: ['banMembers'],
+ membro: ['BAN_MEMBERS'],
+ bot: ['BAN_MEMBERS'],
dono: false
},
pt: {
@@ -52,7 +52,7 @@ module.exports = class BaninfoCommand {
let member;
if (!ctx.args[0]) {
return ctx.message.channel.slashReply({
- content: `:x: ${ctx.message.author} **|** ${ctx.idioma.ban.noarg}`
+ content: `:x: ${ctx.message.author.mention} **|** ${ctx.idioma.ban.noarg}`
});
}
@@ -75,10 +75,10 @@ module.exports = class BaninfoCommand {
embed.setColor('#ffcbdb');
embed.addField(`${ctx.idioma.baninfo.user}`, `\`\`\`${member.username}#${member.discriminator} (${member.id})\`\`\``);
embed.addField(`${ctx.idioma.baninfo.reason}`, `\`\`\`${banInfo.reason}\`\`\``);
- embed.setFooter('⤷ zulybot.xyz | ' + ctx.idioma.baninfo.desban, global.zuly.user.avatarURL);
- embed.setThumbnail(member.avatarURL);
+ embed.setFooter('⤷ zulybot.xyz | ' + ctx.idioma.baninfo.desban, global.zuly.user.displayAvatarURL({ dynamic: true, format: 'png', size: 4096 }));
+ embed.setThumbnail(memberdisplayAvatarURL({ dynamic: true, format: 'png', size: 4096 }));
ctx.message.channel.slashReply({
- content: ctx.message.author,
+ content: ctx.message.author.mention,
embeds: [embed.get()]
}).then(message => {
message.addReaction('🐹');
@@ -93,7 +93,7 @@ module.exports = class BaninfoCommand {
});
collector.on('collect', async () => {
await ctx.message.guild.unbanMember(member.id, motivo);
- ctx.message.channel.slashReply(`:white_check_mark: ${ctx.message.author} **|** ${ctx.idioma.ban.the} **${member.username}** ${ctx.idioma.ban.foi}`);
+ ctx.message.channel.slashReply(`:white_check_mark: ${ctx.message.author.mention} **|** ${ctx.idioma.ban.the} **${member.username}** ${ctx.idioma.ban.foi}`);
});
});
}
diff --git a/src/Commands/Moderation/KickCommand.js b/src/Commands/Moderation/KickCommand.js
index c2fd5a81..f449e918 100644
--- a/src/Commands/Moderation/KickCommand.js
+++ b/src/Commands/Moderation/KickCommand.js
@@ -2,8 +2,8 @@ module.exports = class KickCommand {
constructor () {
return {
permissoes: {
- membro: ['kickMembers'],
- bot: ['kickMembers'],
+ membro: ['KICK_MEMBERS'],
+ bot: ['KICK_MEMBERS'],
dono: false
},
pt: {
@@ -62,7 +62,7 @@ module.exports = class KickCommand {
let member;
if (!ctx.args[0]) {
return ctx.message.channel.slashReply({
- content: `:x: ${ctx.message.author} **|** ${ctx.idioma.ban.noarg}`
+ content: `:x: ${ctx.message.author.mention} **|** ${ctx.idioma.ban.noarg}`
});
}
diff --git a/src/Commands/Moderation/MuteCommand.js b/src/Commands/Moderation/MuteCommand.js
index 75e25c5d..be17cf65 100644
--- a/src/Commands/Moderation/MuteCommand.js
+++ b/src/Commands/Moderation/MuteCommand.js
@@ -69,14 +69,14 @@ module.exports = class BanCommand {
let member;
if (!ctx.args[0]) {
return ctx.message.channel.slashReply({
- content: `:x: ${ctx.message.author} **|** ${ctx.idioma.ban.noarg}`
+ content: `:x: ${ctx.message.author.mention} **|** ${ctx.idioma.ban.noarg}`
});
}
if (!ctx.messages[0]) {
member = await global.zuly.users.fetch(ctx.args[0]).then(info => info).catch(() => {
return ctx.message.channel.slashReply({
- content: `:x: ${ctx.message.author} **|** Usuário desconhecido.`
+ content: `:x: ${ctx.message.author.mention} **|** Usuário desconhecido.`
});
});
}
@@ -100,7 +100,7 @@ module.exports = class BanCommand {
await global.zuly.muteMember(ctx.message.guild, member, motivo, timestamp(ctx.args[2]));
ctx.message.channel.slashReply({
- content: `:white_check_mark: ${ctx.message.author} **|** ${ctx.idioma.ban.the} **${member.username}** ${ctx.idioma.ban.foi}`
+ content: `:white_check_mark: ${ctx.message.author.mention} **|** ${ctx.idioma.ban.the} **${member.username}** ${ctx.idioma.ban.foi}`
});
}
};
diff --git a/src/Commands/Moderation/PruneCommand.js b/src/Commands/Moderation/PruneCommand.js
index c4be204f..fe3bda8e 100644
--- a/src/Commands/Moderation/PruneCommand.js
+++ b/src/Commands/Moderation/PruneCommand.js
@@ -49,13 +49,13 @@ module.exports = class PruneCommand {
async run (ctx) {
if (!ctx.args[0]) {
return ctx.message.channel.slashReply({
- content: `:x: ${ctx.message.author} **|** ${ctx.idioma.clear.no}.`
+ content: `:x: ${ctx.message.author.mention} **|** ${ctx.idioma.clear.no}.`
});
}
// ctx.message.delete()
if (Number(ctx.args[0]) > 2000 || Number(ctx.args[0]) < 2) {
return ctx.message.channel.slashReply({
- content: `:x: ${ctx.message.author} **|** ${ctx.idioma.clear.num}.`
+ content: `:x: ${ctx.message.author.mention} **|** ${ctx.idioma.clear.num}.`
});
}
const ids = [];
@@ -67,7 +67,7 @@ module.exports = class PruneCommand {
ctx.message.channel.deleteMessages(ids);
ctx.message.channel.slashReply({
- content: `:white_check_mark: ${ctx.message.author} **|** **${ctx.args[0]} ${ctx.idioma.clear.msg}.`
+ content: `:white_check_mark: ${ctx.message.author.mention} **|** **${ctx.args[0]} ${ctx.idioma.clear.msg}.`
});
}
};
diff --git a/src/Commands/Moderation/UnbanCommand.js b/src/Commands/Moderation/UnbanCommand.js
index 16ded435..96e7adbe 100644
--- a/src/Commands/Moderation/UnbanCommand.js
+++ b/src/Commands/Moderation/UnbanCommand.js
@@ -2,8 +2,8 @@ module.exports = class BanCommand {
constructor () {
return {
permissoes: {
- membro: ['banMembers'],
- bot: ['banMembers'],
+ membro: ['BAN_MEMBERS'],
+ bot: ['BAN_MEMBERS'],
dono: false
},
pt: {
@@ -62,14 +62,14 @@ module.exports = class BanCommand {
let member;
if (!ctx.args[0]) {
return ctx.message.channel.slashReply({
- content: `:x: ${ctx.message.author} **|** ${ctx.idioma.ban.noarg}`
+ content: `:x: ${ctx.message.author.mention} **|** ${ctx.idioma.ban.noarg}`
});
}
if (!ctx.messages[0]) {
member = await global.zuly.users.fetch(ctx.args[0]).then(info => info).catch(() => {
return ctx.message.channel.slashReply({
- content: `:x: ${ctx.message.author} **|** Usuário desconhecido.`
+ content: `:x: ${ctx.message.author.mention} **|** Usuário desconhecido.`
});
});
}
@@ -85,7 +85,7 @@ module.exports = class BanCommand {
await ctx.message.guild.unbanMember(member.id, motivo);
ctx.message.channel.slashReply({
- content: `:white_check_mark: ${ctx.message.author} **|** ${ctx.idioma.ban.the} **${member.username}** ${ctx.idioma.ban.foi}`
+ content: `:white_check_mark: ${ctx.message.author.mention} **|** ${ctx.idioma.ban.the} **${member.username}** ${ctx.idioma.ban.foi}`
});
}
};
diff --git a/src/Commands/Moderation/UnmuteCommand.js b/src/Commands/Moderation/UnmuteCommand.js
index 2e8f2fc4..4ffeee04 100644
--- a/src/Commands/Moderation/UnmuteCommand.js
+++ b/src/Commands/Moderation/UnmuteCommand.js
@@ -62,14 +62,14 @@ module.exports = class BanCommand {
let member;
if (!ctx.args[0]) {
return ctx.message.channel.slashReply({
- content: `:x: ${ctx.message.author} **|** ${ctx.idioma.ban.noarg}`
+ content: `:x: ${ctx.message.author.mention} **|** ${ctx.idioma.ban.noarg}`
});
}
if (!ctx.messages[0]) {
member = await global.zuly.users.fetch(ctx.args[0]).then(info => info).catch(() => {
return ctx.message.channel.slashReply({
- content: `:x: ${ctx.message.author} **|** Usuário desconhecido.`
+ content: `:x: ${ctx.message.author.mention} **|** Usuário desconhecido.`
});
});
}
@@ -87,7 +87,7 @@ module.exports = class BanCommand {
await global.zuly.unmuteMember(ctx.message.guild, member, motivo);
ctx.message.channel.slashReply({
- content: `:white_check_mark: ${ctx.message.author} **|** ${ctx.idioma.ban.the} **${member.username}** ${ctx.idioma.ban.foi}`
+ content: `:white_check_mark: ${ctx.message.author.mention} **|** ${ctx.idioma.ban.the} **${member.username}** ${ctx.idioma.ban.foi}`
});
}
};
diff --git a/src/Commands/Utils/AvatarCommand.js b/src/Commands/Utils/AvatarCommand.js
index 76b8c952..4cc6300c 100644
--- a/src/Commands/Utils/AvatarCommand.js
+++ b/src/Commands/Utils/AvatarCommand.js
@@ -53,17 +53,17 @@ module.exports = class CalcCommand {
}
async run (ctx) {
- const user = ctx.args[0] ? ctx.messages[0] || await global.zuly.users.fetch(ctx.args[0]).catch(() => ctx.message.author) : ctx.message.author;
+ const user = await global.zuly.users.fetch(ctx.args[0]).catch(() => ctx.message.author) || ctx.message.author;
const embed = new ctx.embed();
embed.setTitle(`${ctx.idioma.avatar.title} __${user.username}#${user.discriminator}__`);
- embed.setDescription(`> <:zu_download:890281922331291698> ${ctx.idioma.avatar.download} [${ctx.idioma.avatar.click}](${user.avatarURL})`);
+ embed.setDescription(`> <:zu_download:890281922331291698> ${ctx.idioma.avatar.download} [${ctx.idioma.avatar.click}](${user.displayAvatarURL({ dynamic: true, format: 'png', size: 4096 })})`);
embed.setColor('#ffcbdb');
- embed.setImage(user.avatarURL);
- embed.setThumbnail(global.zuly.avatarURL);
- embed.setFooter('⤷ zulybot.xyz', global.zuly.user.avatarURL);
+ embed.setImage(user.displayAvatarURL({ dynamic: true, format: 'png', size: 4096 }));
+ embed.setThumbnail(global.zuly.user.displayAvatarURL({ dynamic: true, format: 'png', size: 4096 }));
+ embed.setFooter('⤷ zulybot.xyz', global.zuly.user.displayAvatarURL({ dynamic: true, format: 'png', size: 4096 }));
ctx.message.channel.slashReply({
- content: ctx.message.author,
+ content: ctx.message.author.mention,
embeds: [embed.get()]
});
}
diff --git a/src/Commands/Utils/BannerCommand.js b/src/Commands/Utils/BannerCommand.js
index ce9b82c0..109ca91a 100644
--- a/src/Commands/Utils/BannerCommand.js
+++ b/src/Commands/Utils/BannerCommand.js
@@ -53,7 +53,7 @@ module.exports = class CalcCommand {
}
async run (ctx) {
- const user = ctx.args[0] ? ctx.messages[0] || await global.zuly.users.fetch(ctx.args[0]).catch(() => ctx.message.author) : ctx.message.author;
+ const user = await global.zuly.users.fetch(ctx.args[0]).catch(() => ctx.message.author) || ctx.message.author;
const banner = await global.zuly.getRESTBanner(user.id);
if (banner.startsWith('https://singlecolorimage.com/')) {
const hex = banner.replace('https://singlecolorimage.com/get/', '').replace('/600x240', '');
@@ -62,10 +62,10 @@ module.exports = class CalcCommand {
embed.setDescription(`> <:zu_download:890281922331291698> ${ctx.idioma.avatar.hex} **#${hex}**`);
embed.setColor('#ffcbdb');
embed.setImage(banner || 'https://imgur.com/XVLqrn1.png');
- embed.setThumbnail(user.avatarURL || global.zuly.avatarURL);
- embed.setFooter('⤷ zulybot.xyz', global.zuly.user.avatarURL);
+ embed.setThumbnail(user.displayAvatarURL({ dynamic: true, format: 'png', size: 4096 }) || global.zuly.user.displayAvatarURL({ dynamic: true, format: 'png', size: 4096 }));
+ embed.setFooter('⤷ zulybot.xyz', global.zuly.user.displayAvatarURL({ dynamic: true, format: 'png', size: 4096 }));
ctx.message.channel.slashReply({
- content: ctx.message.author,
+ content: ctx.message.author.mention,
embeds: [embed.get()]
});
}
@@ -75,10 +75,10 @@ module.exports = class CalcCommand {
embed.setDescription(`> <:zu_download:890281922331291698> ${ctx.idioma.avatar.download} [${ctx.idioma.avatar.click}](${banner || 'https://imgur.com/XVLqrn1.png'})`);
embed.setColor('#ffcbdb');
embed.setImage(banner || 'https://imgur.com/XVLqrn1.png');
- embed.setThumbnail(user.avatarURL || global.zuly.avatarURL);
- embed.setFooter('⤷ zulybot.xyz', global.zuly.user.avatarURL);
+ embed.setThumbnail(user.displayAvatarURL({ dynamic: true, format: 'png', size: 4096 }) || global.zuly.user.displayAvatarURL({ dynamic: true, format: 'png', size: 4096 }));
+ embed.setFooter('⤷ zulybot.xyz', global.zuly.user.displayAvatarURL({ dynamic: true, format: 'png', size: 4096 }));
ctx.message.channel.slashReply({
- content: ctx.message.author,
+ content: ctx.message.author.mention,
embeds: [embed.get()]
});
}
diff --git a/src/Commands/Utils/CalcCommand.js b/src/Commands/Utils/CalcCommand.js
index cf542e2b..fc0c2036 100644
--- a/src/Commands/Utils/CalcCommand.js
+++ b/src/Commands/Utils/CalcCommand.js
@@ -49,7 +49,7 @@ module.exports = class CalcCommand {
async run (ctx) {
if (!ctx.args[0]) {
return ctx.message.channel.slashReply({
- content: `:x: ${ctx.message.author} **|** ${ctx.idioma.calc.ex.replace('%p', ctx.prefix)}`
+ content: `:x: ${ctx.message.author.mention} **|** ${ctx.idioma.calc.ex.replace('%p', ctx.prefix)}`
});
}
const math = require('math-expression-evaluator');
@@ -58,10 +58,10 @@ module.exports = class CalcCommand {
val = math.eval(ctx.args.join(' '));
}
catch (err) {
- return ctx.message.channel.slashReply(`:x: ${ctx.message.author} **|** ${ctx.idioma.calc.inv}`);
+ return ctx.message.channel.slashReply(`:x: ${ctx.message.author.mention} **|** ${ctx.idioma.calc.inv}`);
}
ctx.message.channel.slashReply({
- content: `<:zu_calc:880851703442833408> ${ctx.message.author} **|** ${ctx.idioma.calc.res}: \`${val}\``
+ content: `<:zu_calc:880851703442833408> ${ctx.message.author.mention} **|** ${ctx.idioma.calc.res}: \`${val}\``
});
}
};
diff --git a/src/Commands/Utils/ColorizerCommand.js b/src/Commands/Utils/ColorizerCommand.js
index a73fb82c..db2f4c27 100644
--- a/src/Commands/Utils/ColorizerCommand.js
+++ b/src/Commands/Utils/ColorizerCommand.js
@@ -67,13 +67,13 @@ module.exports = class CalcCommand {
const res = response.data;
if (!ctx.message.channel.nsfw) {
ctx.message.channel.slashReply({
- content: `📸 ${ctx.message.author} **|** ${res.link}`,
+ content: `📸 ${ctx.message.author.mention} **|** ${res.link}`,
flags: ctx.ephemeral
});
}
else {
ctx.message.channel.slashReply({
- content: `📸 ${ctx.message.author} **|** ${res.link}`
+ content: `📸 ${ctx.message.author.mention} **|** ${res.link}`
});
}
});
diff --git a/src/Commands/Utils/InviteCommand.js b/src/Commands/Utils/InviteCommand.js
index 6f22056c..312687e4 100644
--- a/src/Commands/Utils/InviteCommand.js
+++ b/src/Commands/Utils/InviteCommand.js
@@ -45,10 +45,10 @@ module.exports = class InviteCommand {
embed.setTitle(`📩 ${ctx.idioma.invite.add}`);
embed.setDescription(ctx.idioma.invite.desc.replace('%id', global.zuly.user.id));
embed.setColor('#ffcbdb');
- embed.setThumbnail(global.zuly.user.avatarURL);
- embed.setFooter('⤷ zulybot.xyz', global.zuly.user.avatarURL);
+ embed.setThumbnail(global.zuly.user.displayAvatarURL({ dynamic: true, format: 'png', size: 4096 }));
+ embed.setFooter('⤷ zulybot.xyz', global.zuly.user.displayAvatarURL({ dynamic: true, format: 'png', size: 4096 }));
ctx.message.channel.slashReply({
- content: ctx.message.author,
+ content: ctx.message.author.mention,
embeds: [embed.get()]
});
}
diff --git a/src/Commands/Utils/MessagesCommand.js b/src/Commands/Utils/MessagesCommand.js
index 343ada3f..94966380 100644
--- a/src/Commands/Utils/MessagesCommand.js
+++ b/src/Commands/Utils/MessagesCommand.js
@@ -68,7 +68,7 @@ module.exports = class PingCommand {
embed.setColor('#ffcbdb');
embed.setDescription(`**${user.username}** ${ctx.idioma.messages.tem} **${valor} ${ctx.idioma.messages.msg}**`);
ctx.message.channel.slashReply({
- content: ctx.message.author,
+ content: ctx.message.author.mention,
embeds: [embed.get()]
});
}
diff --git a/src/Commands/Utils/PrintCommand.js b/src/Commands/Utils/PrintCommand.js
index 9126e569..6d228caa 100644
--- a/src/Commands/Utils/PrintCommand.js
+++ b/src/Commands/Utils/PrintCommand.js
@@ -52,9 +52,9 @@ module.exports = class PrintCommand {
embed.setDescription(`> <:zu_info:911303533859590144> ${ctx.args[0]}`);
embed.setColor('#ffcbdb');
embed.setImage(`https://image.thum.io/get/maxAge/12/width/700/crop/900/${encodeURIComponent(ctx.args[0])}`);
- embed.setFooter('⤷ zulybot.xyz', global.zuly.user.avatarURL);
+ embed.setFooter('⤷ zulybot.xyz', global.zuly.user.displayAvatarURL({ dynamic: true, format: 'png', size: 4096 }));
ctx.message.channel.slashReply({
- content: ctx.message.author,
+ content: ctx.message.author.mention,
embeds: [embed.get()],
flags: ctx.ephemeral
});
diff --git a/src/Commands/Utils/TraduzirCommand.js b/src/Commands/Utils/TraduzirCommand.js
index 7b37a6a7..a6db1ae0 100644
--- a/src/Commands/Utils/TraduzirCommand.js
+++ b/src/Commands/Utils/TraduzirCommand.js
@@ -56,17 +56,17 @@ module.exports = class PingCommand {
async run (ctx) {
if (!ctx.args[0]) return ctx.message.channel.slashReply({
- content: `:x: ${ctx.message.author} **|** ${ctx.idioma.tradutor.text.replace(/%/g, ctx.prefix)}`
+ content: `:x: ${ctx.message.author.mention} **|** ${ctx.idioma.tradutor.text.replace(/%/g, ctx.prefix)}`
});
if (!ctx.args[1]) {
return ctx.message.channel.slashReply({
- content: `:x: ${ctx.message.author} **|** ${ctx.idioma.tradutor.text.replace(/%/g, ctx.prefix)}`
+ content: `:x: ${ctx.message.author.mention} **|** ${ctx.idioma.tradutor.text.replace(/%/g, ctx.prefix)}`
});
}
const translate = require('@vitalets/google-translate-api');
translate(ctx.args.slice(1).join(' '), { to: ctx.args[0] }).then(res => {
ctx.message.channel.slashReply({
- content: `🌎 ${ctx.message.author} **|** ` + '`' + res.text.replace(/`/g, '').replace(/@/g, '') + '`'
+ content: `🌎 ${ctx.message.author.mention} **|** ` + '`' + res.text.replace(/`/g, '').replace(/@/g, '') + '`'
});
});
}
diff --git a/src/Commands/Utils/UserinfoCommand.js b/src/Commands/Utils/UserinfoCommand.js
index 0edc6552..07bf704b 100644
--- a/src/Commands/Utils/UserinfoCommand.js
+++ b/src/Commands/Utils/UserinfoCommand.js
@@ -53,53 +53,50 @@ module.exports = class CalcCommand {
}
async run (ctx) {
- const { Constants: { UserFlags } } = require('eris');
-
- const badgeEmojis = {
- DISCORD_EMPLOYEE: '<:zu_staffdc:933096931197071380>',
- DISCORD_PARTNER: '<:zu_partner:885196140042158170>',
- HYPESQUAD_EVENTS: '<:zu_hypesquad:885919442117222400>',
- BUG_HUNTER_LEVEL_1: '<:zu_bughunter_1:885918998426951721>',
- HOUSE_BRAVERY: '<:zu_bravery:885918769422151750>',
- HOUSE_BRILLIANCE: '<:zu_brilliance:885918816654213191>',
- HOUSE_BALANCE: '<:zu_balance:885918786878836827>',
- EARLY_SUPPORTER: '<:zu_supporter:885919070476705792>',
- BUG_HUNTER_LEVEL_2: '<:zu_bughunter_2:885919018349920306>',
- VERIFIED_BOT_DEVELOPER: '<:zu_developer:885918499380293692>',
- CERTIFIED_MODERATOR: '<:zu_certifiedmod:885193463111483412>',
- VERIFIED_BOT: '<:zu_verifiedbot_1:885923881108504616><:zu_verifiedbot_2:885923960473153546>',
- BOT: '<:zu_bot:885923705316859955>',
- BOT_HTTP_INTERACTIONS: '<:zu_bot:885923705316859955>'
- };
-
function getUserBadges (user) {
- const badges = [];
- for (const flag in UserFlags) {
- if (user.publicFlags & UserFlags[flag]) {
- badges.push(badgeEmojis[flag]);
- }
+ const badgeEmojis = {
+ DISCORD_EMPLOYEE: '<:zu_staffdc:933096931197071380>',
+ PARTNERED_SERVER_OWNER: '<:zu_partner:885196140042158170>',
+ HYPESQUAD_EVENTS: '<:zu_hypesquad:885919442117222400>',
+ BUGHUNTER_LEVEL_1: '<:zu_bughunter_1:885918998426951721>',
+ HOUSE_BRAVERY: '<:zu_bravery:885918769422151750>',
+ HOUSE_BRILLIANCE: '<:zu_brilliance:885918816654213191>',
+ HOUSE_BALANCE: '<:zu_balance:885918786878836827>',
+ EARLY_SUPPORTER: '<:zu_supporter:885919070476705792>',
+ BUGHUNTER_LEVEL_2: '<:zu_bughunter_2:885919018349920306>',
+ EARLY_VERIFIED_BOT_DEVELOPER: '<:zu_developer:885918499380293692>',
+ CERTIFIED_MODERATOR: '<:zu_certifiedmod:885193463111483412>',
+ VERIFIED_BOT: '<:zu_verifiedbot_1:885923881108504616><:zu_verifiedbot_2:885923960473153546>',
+ BOT: '<:zu_bot:885923705316859955>',
+ BOT_HTTP_INTERACTIONS: '<:zu_bot:885923705316859955>'
+ };
+ const userBadges = user.flags?.toArray() || '';
+ let badgesArray = '';
+ for (let i = 0; i < userBadges.length; i++) {
+ badgesArray += badgeEmojis[userBadges[i]];
}
- return badges;
+ return badgesArray;
}
- const user = ctx.args[0] ? ctx.messages[0] || await global.zuly.users.fetch(ctx.args[0]).catch(() => ctx.message.author) : ctx.message.author;
+
+ const user = await global.zuly.users.fetch(ctx.args[0]).catch(() => ctx.message.author) || ctx.message.author;
const badges = getUserBadges(user);
const embed = new ctx.embed();
const userb = await global.zuly.getRESTBanner(user.id);
if (user.avatar.startsWith('a_')) {
- embed.setTitle(`${user.username} <:zu_nitro:885919779205029898>${badges.join('')}`);
+ embed.setTitle(`${user.username} <:zu_nitro:885919779205029898>${badges}`);
}
else {
- embed.setTitle(`${user.username} <:zu_basic:885925886837264384>${badges.join('')}`);
+ embed.setTitle(`${user.username} <:zu_basic:885925886837264384>${badges}`);
}
embed.addField(`📘 ${ctx.idioma.userinfo.tag} __${user.username}__`, `\`${user.username}#${user.discriminator}\``, true);
embed.addField(`📚 ${ctx.idioma.userinfo.id} __${user.username}__`, `\`${user.id}\``, true);
embed.addField(`📆 ${ctx.idioma.userinfo.create}`, ``, true);
embed.setColor('#ffcbdb');
- embed.setThumbnail(user.avatarURL || 'https://i.imgur.com/2dwGomm.png');
+ embed.setThumbnail(user.displayAvatarURL({ dynamic: true, format: 'png', size: 4096 }) || 'https://i.imgur.com/2dwGomm.png');
embed.setImage(userb);
ctx.message.channel.slashReply({
- content: ctx.message.author,
+ content: ctx.message.author.mention,
embeds: [embed.get()]
}).catch((e) => {
console.log(e);
@@ -115,10 +112,10 @@ module.exports = class CalcCommand {
embed2.addField(`📚 ${ctx.idioma.userinfo.id} __${user.username}__`, `\`${user.id}\``, true);
embed2.addField(`📆 ${ctx.idioma.userinfo.create}`, ``);
embed2.setColor('#ffcbdb');
- embed2.setThumbnail(user.avatarURL || 'https://i.imgur.com/2dwGomm.png');
+ embed2.setThumbnail(user.displayAvatarURL({ dynamic: true, format: 'png', size: 4096 }) || 'https://i.imgur.com/2dwGomm.png');
embed2.setImage(userb);
ctx.message.channel.slashReply({
- content: ctx.message.author,
+ content: ctx.message.author.mention,
embeds: [embed2.get()]
}).catch((e) => {
console.log(e);
diff --git a/src/Commands/Waifu/WaifuCommand.js b/src/Commands/Waifu/WaifuCommand.js
index f511bb80..cd4e0041 100644
--- a/src/Commands/Waifu/WaifuCommand.js
+++ b/src/Commands/Waifu/WaifuCommand.js
@@ -63,13 +63,13 @@ module.exports = class EvalCommand {
embed.setColor('#ffcbdb');
embed.setImage(waifu.image);
if (!dono) {
- embed.setFooter('⤷ zulybot.xyz | ' + ctx.idioma.waifu.casar, global.zuly.user.avatarURL);
+ embed.setFooter('⤷ zulybot.xyz | ' + ctx.idioma.waifu.casar, global.zuly.user.displayAvatarURL({ dynamic: true, format: 'png', size: 4096 }));
}
else {
- embed.setFooter('⤷ zulybot.xyz', global.zuly.user.avatarURL);
+ embed.setFooter('⤷ zulybot.xyz', global.zuly.user.displayAvatarURL({ dynamic: true, format: 'png', size: 4096 }));
}
ctx.message.channel.slashReply({
- content: ctx.message.author,
+ content: ctx.message.author.mention,
embeds: [embed.get()]
}).then(async message => {
if (!dono) {
@@ -86,7 +86,7 @@ module.exports = class EvalCommand {
MarryCollector.on('collect', async () => {
const date = Date.now();
const marrytime = await global.zuly.db.get(`timeout-${ctx.message.author.id}`);
- if (marrytime !== null && timeout - (date - marrytime) > 0) return ctx.message.channel.slashReply(`:x: ${ctx.message.author} **|** ${ctx.idioma.waifu.casado}`);
+ if (marrytime !== null && timeout - (date - marrytime) > 0) return ctx.message.channel.slashReply(`:x: ${ctx.message.author.mention} **|** ${ctx.idioma.waifu.casado}`);
const ryos = await global.zuly.db.get(`ryos-${ctx.message.author.id}`);
if (ryos) {
global.zuly.db.set(`ryos-${ctx.message.author.id}`, ryos + waifu.valor);
@@ -103,7 +103,7 @@ module.exports = class EvalCommand {
embed.setImage(waifu.image);
embed.setFooter('⤷ zulybot.xyz | ' + ctx.idioma.waifu.casou.replace('%w', waifu.name), waifu.image);
message.edit({
- content: ctx.message.author,
+ content: ctx.message.author.mention,
embeds: [embed.get()]
});
});
diff --git a/src/Containers/Premium/bot.js b/src/Containers/Premium/bot.js
index 6f6b3750..0c631208 100644
--- a/src/Containers/Premium/bot.js
+++ b/src/Containers/Premium/bot.js
@@ -23,7 +23,7 @@ client.on('guildCreate', async (guild) => {
embed.setDescription(`Olá, aparentemente você adicionou minha versão premium em seu servidor **${guild.name}**, muito obrigado por seu apoio! Com sua ajuda podemos investir cada vez mais em nossos projetos!`);
embed.setColor('#ffcbdb');
embed.setImage('https://tenor.com/bqUXw.gif');
- embed.setThumbnail(global.zuly.user.avatarURL);
+ embed.setThumbnail(global.zuly.user.displayAvatarURL({ dynamic: true, format: 'png', size: 4096 }));
dm.createMessage({
embeds: [embed.get()]
});
@@ -35,7 +35,7 @@ client.on('guildCreate', async (guild) => {
embed.setDescription('Olá, aparentemente você adicionou minha versão premium, porém aparentemente você não é um usuário premium, infelizmente tive que sair de seu servidor! <:zu_lori_sob:909096109618647040>');
embed.setColor('#ffcbdb');
embed.setImage('https://tenor.com/bqUXw.gif');
- embed.setThumbnail(global.zuly.user.avatarURL);
+ embed.setThumbnail(global.zuly.user.displayAvatarURL({ dynamic: true, format: 'png', size: 4096 }));
dm.createMessage({
embeds: [embed.get()]
}).then(() => {
diff --git a/src/Events/guildBanAdd.js b/src/Events/guildBanAdd.js
deleted file mode 100644
index d845e3aa..00000000
--- a/src/Events/guildBanAdd.js
+++ /dev/null
@@ -1,36 +0,0 @@
-module.exports = class GuildBanAddEvent {
- constructor () {
- return {
- nome: 'guildBanAdd',
- run: this.run
- };
- }
- async run (guild, user) {
- const channelDB = await global.zuly.db.get(`logs-${guild.id}`) || '927209681754132530';
- const channel = await global.zuly.getRESTChannel(channelDB);
-
- const auditLog = await guild.getAuditLog({
- type: 22,
- limit: 1
- });
-
- const reason = auditLog.entries[0].reason;
- const target = auditLog.users[0];
-
- let idioma = require('../Config/idiomas');
- let lang = await global.zuly.db.get(`idioma-${guild.id}`) || 'pt_br';
- lang = lang.replace(/-/g, '_');
- idioma = idioma[lang];
-
- const embed = new global.zuly.manager.Ebl();
- embed.setTitle(`${guild.name} | ${idioma.logs.bans.title} [${idioma.logs.bani}]`);
- embed.addField(`📝 ${idioma.logs.reason}`, `\`\`\`${reason}\`\`\``, true);
- embed.addField(`<:zu_banCat:933106129871966228> ${idioma.logs.user}`, `<@${user.id}> \`(${user.username}#${user.discriminator} [${user.id}])\``);
- embed.addField(`<:zu_members:936975701322633256> ${idioma.logs.mod}`, `<@${target.id}> \`(${target.username}#${target.discriminator} [${target.id}])\``);
- embed.setColor('#E74C3C');
- embed.setFooter('⤷ zulybot.xyz', global.zuly.user.avatarURL);
- channel.createMessage({
- embeds: [embed.get()]
- });
- }
-};
diff --git a/src/Events/guildBanRemove.js b/src/Events/guildBanRemove.js
deleted file mode 100644
index ff677a60..00000000
--- a/src/Events/guildBanRemove.js
+++ /dev/null
@@ -1,36 +0,0 @@
-module.exports = class GuildBanRemoveEvent {
- constructor () {
- return {
- nome: 'guildBanRemove',
- run: this.run
- };
- }
- async run (guild, user) {
- const channelDB = await global.zuly.db.get(`logs-${guild.id}`) || '927209681754132530';
- const channel = await global.zuly.getRESTChannel(channelDB);
-
- const auditLog = await guild.getAuditLog({
- type: 23,
- limit: 1
- });
-
- const reason = auditLog.entries[0].reason;
- const target = auditLog.users[0];
-
- let idioma = require('../Config/idiomas');
- let lang = await global.zuly.db.get(`idioma-${guild.id}`) || 'pt_br';
- lang = lang.replace(/-/g, '_');
- idioma = idioma[lang];
-
- const embed = new global.zuly.manager.Ebl();
- embed.setTitle(`${guild.name} | ${idioma.logs.bans.title} [${idioma.logs.desbani}]`);
- embed.addField(`📝 ${idioma.logs.reason}`, `\`\`\`${reason}\`\`\``, true);
- embed.addField(`<:zu_banCat:933106129871966228> ${idioma.logs.user}`, `<@${user.id}> \`(${user.username}#${user.discriminator} [${user.id}])\``);
- embed.addField(`<:zu_members:936975701322633256> ${idioma.logs.mod}`, `<@${target.id}> \`(${target.username}#${target.discriminator} [${target.id}])\``);
- embed.setColor('#2ECC71');
- embed.setFooter('⤷ zulybot.xyz', global.zuly.user.avatarURL);
- channel.createMessage({
- embeds: [embed.get()]
- });
- }
-};
diff --git a/src/Events/guildCreate.js b/src/Events/guildCreate.js
index c6a00140..6c14c530 100644
--- a/src/Events/guildCreate.js
+++ b/src/Events/guildCreate.js
@@ -11,8 +11,8 @@ module.exports = class GuildCreateEvent {
const totalUsers = global.zuly.guilds.cache.reduce((acc, guild) => acc + guild.memberCount, 0);
const system = require('../Config/system');
- const ch = await global.zuly.getRESTChannel('880863493472022539');
- const ch2 = await global.zuly.getRESTChannel('902632703160094752');
+ const ch = await global.zuly.channels.cache.get('880863493472022539');
+ const ch2 = await global.zuly.channels.cache.get('902632703160094752');
ch.edit({
name: `🧭 → Servers [${global.zuly.guilds.cache.size}]`
@@ -33,11 +33,11 @@ module.exports = class GuildCreateEvent {
embed.setDescription(`> 😎 Fui adicionado a um servidor, yay! \`(Cluster ${config.cluster.id} (${config.cluster.nome}) | Shard ${guild.shard.id})\``);
embed.addField(`🌎 GuildInfo | ${guild.name}`, `🧭 **ID:** \`${guild.id} [${guild.shard.id}]\`\n👑 **Owner:** \`${owner.username}#${owner.discriminator} [${owner.id}]\`\n🔍 **Members:** \`${guild.memberCount} members\`\n **Boosts:** \`${guild.premiumSubscriptionCount} boosts\`\n:calendar: **Created at:** \`${moment(guild.createdAt).format('📆 DD/MM/YY')} | ${moment(guild.createdAt).format('⏰ HH:mm:ss')}\`\n🗺️ **Lang:** \`${guild.preferredLocale}\``);
embed.setColor('#2ECC71');
- embed.setFooter('⤷ zulybot.xyz', global.zuly.user.avatarURL);
- embed.setThumbnail(global.zuly.user.avatarURL);
+ embed.setFooter('⤷ zulybot.xyz', global.zuly.user.displayAvatarURL({ dynamic: true, format: 'png', size: 4096 }));
+ embed.setThumbnail(global.zuly.user.displayAvatarURL({ dynamic: true, format: 'png', size: 4096 }));
await global.zuly.executeWebhook(system.gcreate.id, system.gcreate.token, {
- avatarURL: global.zuly.user.avatarURL,
+ avatarURL: global.zuly.user.displayAvatarURL({ dynamic: true, format: 'png', size: 4096 }),
username: global.zuly.user.username,
embeds: [embed.get()]
});
diff --git a/src/Events/guildDelete.js b/src/Events/guildDelete.js
index 118acad1..7500179d 100644
--- a/src/Events/guildDelete.js
+++ b/src/Events/guildDelete.js
@@ -11,8 +11,8 @@ module.exports = class GuildDeleteEvent {
const totalUsers = global.zuly.guilds.cache.reduce((acc, guild) => acc + guild.memberCount, 0);
const system = require('../Config/system');
- const ch = await global.zuly.getRESTChannel('880863493472022539');
- const ch2 = await global.zuly.getRESTChannel('902632703160094752');
+ const ch = await global.zuly.channels.cache.get('880863493472022539');
+ const ch2 = await global.zuly.channels.cache.get('902632703160094752');
ch.edit({
name: `🧭 → Servers [${global.zuly.guilds.cache.size}]`
@@ -33,11 +33,11 @@ module.exports = class GuildDeleteEvent {
embed.setDescription(`> 😭 Fui removida de um servidor, ah :( \`(Cluster ${config.cluster.id} (${config.cluster.nome}) | Shard ${guild.shard.id})\``);
embed.addField(`🌎 GuildInfo | ${guild.name}`, `🧭 **ID:** \`${guild.id} [${guild.shard.id}]\`\n👑 **Owner:** \`${owner.username}#${owner.discriminator} [${owner.id}]\`\n🔍 **Members:** \`${guild.memberCount} members\`\n **Boosts:** \`${guild.premiumSubscriptionCount} boosts\`\n:calendar: **Created at:** \`${moment(guild.createdAt).format('📆 DD/MM/YY')} | ${moment(guild.createdAt).format('⏰ HH:mm:ss')}\`\n🗺️ **Lang:** \`${guild.preferredLocale}\``);
embed.setColor('#ff0000');
- embed.setFooter('⤷ zulybot.xyz', global.zuly.user.avatarURL);
- embed.setThumbnail(global.zuly.user.avatarURL);
+ embed.setFooter('⤷ zulybot.xyz', global.zuly.user.displayAvatarURL({ dynamic: true, format: 'png', size: 4096 }));
+ embed.setThumbnail(global.zuly.user.displayAvatarURL({ dynamic: true, format: 'png', size: 4096 }));
await global.zuly.executeWebhook(system.gdelete.id, system.gdelete.token, {
- avatarURL: global.zuly.user.avatarURL,
+ avatarURL: global.zuly.user.displayAvatarURL({ dynamic: true, format: 'png', size: 4096 }),
username: global.zuly.user.username,
embeds: [embed.get()]
});
diff --git a/src/Events/interactionCreate.js b/src/Events/interactionCreate.js
index b938b484..0340f656 100644
--- a/src/Events/interactionCreate.js
+++ b/src/Events/interactionCreate.js
@@ -7,11 +7,14 @@ module.exports = class InteractionEvent {
};
}
async run (interaction) {
+ const { WebhookClient } = require('discord.js');
if (!interaction.isCommand()) return;
await interaction.deferReply();
const blacklist = await global.zuly.db.get(`botban-${interaction.member.user.id}`);
if (blacklist) {
const msg = interaction;
+ msg.author = msg.user;
+ msg.author.mention = `<@${msg.author.id}>`;
let idioma = require('../Config/idiomas.js');
let lang = await global.zuly.db.get(`idioma-${msg.guild.id}`) || 'pt_br';
lang = lang.replace(/-/g, '_');
@@ -20,8 +23,8 @@ module.exports = class InteractionEvent {
embed.setTitle(`<:zu_banCat:933106129871966228> ${idioma.botban.title} | ${global.zuly.user.username}`);
embed.setDescription(`${idioma.botban.description.replace('%z', global.zuly.user.username).replace('%r', blacklist)}`);
embed.setColor('#ff0000');
- embed.setFooter('⤷ zulybot.xyz', global.zuly.user.avatarURL);
- embed.setThumbnail(global.zuly.user.avatarURL);
+ embed.setFooter('⤷ zulybot.xyz', global.zuly.user.displayAvatarURL({ dynamic: true, format: 'png', size: 4096 }));
+ embed.setThumbnail(global.zuly.user.displayAvatarURL({ dynamic: true, format: 'png', size: 4096 }));
return interaction.createMessage({
content: `<@${interaction.member.user.id}>`,
embeds: [embed.get()]
@@ -55,6 +58,8 @@ module.exports = class InteractionEvent {
}
const msg = interaction;
+ msg.author = msg.user;
+ msg.author.mention = `<@${msg.author.id}>`;
let idioma = require('../Config/idiomas.js');
let lang = await global.zuly.db.get(`idioma-${msg.guild.id}`) || 'pt_br';
lang = lang.replace(/-/g, '_');
@@ -67,7 +72,7 @@ module.exports = class InteractionEvent {
if (command.permissoes.membro.length) {
if (!command.permissoes.membro.every(p => msg.member.permissions.has(p))) {
return msg.channel.slashReply({
- content: `:x: ${msg.author} **|** ${idioma.message.user} \`${command.permissoes.membro}\`.`,
+ content: `:x: ${msg.author.mention} **|** ${idioma.message.user} \`${command.permissoes.membro}\`.`,
flags: 64
});
}
@@ -75,7 +80,7 @@ module.exports = class InteractionEvent {
if (command.permissoes.bot.length) {
if (!command.permissoes.bot.every(p => msg.guild.me.permissionsIn(msg.channel).has(p) || msg.guild.me.permissions.has(p))) {
return msg.channel.slashReply({
- content: `:x: ${msg.author} **|** ${idioma.message.bot} \`${command.permissoes.bot}\`.`,
+ content: `:x: ${msg.author.mention} **|** ${idioma.message.bot} \`${command.permissoes.bot}\`.`,
flags: 64
});
}
@@ -83,7 +88,7 @@ module.exports = class InteractionEvent {
if (command.permissoes.nsfw) {
if (!msg.channel.nsfw) {
return msg.channel.slashReply({
- content: `:x: ${msg.author} **|** ${idioma.message.nsfw}`,
+ content: `:x: ${msg.author.mention} **|** ${idioma.message.nsfw}`,
flags: 64
});
}
@@ -96,12 +101,13 @@ module.exports = class InteractionEvent {
if (!developers.includes(msg.member.id)) {
return msg.channel.slashReply({
- content: `:x: ${msg.author} **|** ${idioma.message.dev}.`,
+ content: `:x: ${msg.author.mention} **|** ${idioma.message.dev}.`,
flags: 64
});
}
}
}
+
this.ctx = {
id: msg.id,
user: msg.author,
@@ -133,60 +139,66 @@ module.exports = class InteractionEvent {
const system = require('../Config/system');
const moment = require('moment');
- const owner = await global.zuly.users.fetch(msg.guild.ownerID);
+
+ const ownerA = await msg.guild.fetchOwner();
+ const owner = ownerA.user;
const embed = new global.zuly.manager.Ebl();
embed.setTitle('<:zu_slash:886681118470987967> Slash Commands');
embed.setColor('#ffcbdb');
embed.setDescription(`>>> 🌎 **Servidor:** \`${msg.guild.name}\`\n🧭 **ID:** \`${msg.guild.id}\`\n👑 **Dono:** \`${owner.username}#${owner.discriminator} [${owner.id}]\`\n🔍 **Membros:** \`${msg.guild.memberCount} members\`\n **Boosts:** \`${msg.guild.premiumSubscriptionCount} boosts\`\n:calendar: **Criado em:** \`${moment(msg.guild.createdAt).format('📆 DD/MM/YY')} | ${moment(msg.guild.createdAt).format('⏰ HH:mm:ss')}\`\n🗺️ **Idioma:** \`${msg.guild.preferredLocale}\`\n<:zu_slash:886681118470987967> **Comando:** \`${interaction.commandName}\`\n💻 **Argumentos:** \`${args.slice(0, 1024) || 'Não Tem'}\``);
- embed.addField('<:zu_membros:885214377182109696> **Usuário:**', `>>> 📘 **Informações:** \`${msg.author.username}#${msg.author.discriminator} [${msg.author.id}]\`\n📆 **Criação da conta:** `);
- embed.setThumbnail(global.zuly.user.avatarURL);
- embed.setFooter('⤷ zulybot.xyz', global.zuly.user.avatarURL);
+ embed.addField('<:zu_membros:885214377182109696> **Usuário:**', `>>> 📘 **Informações:** \`${msg.author.username}#${msg.author.discriminator} [${msg.author.id}]\``);
+ embed.setThumbnail(global.zuly.user.displayAvatarURL({ dynamic: true, format: 'png', size: 4096 }));
+ embed.setFooter('⤷ zulybot.xyz', global.zuly.user.displayAvatarURL({ dynamic: true, format: 'png', size: 4096 }));
- const { WebhookClient } = require('discord.js');
- const hook = new WebhookClient(system.command.id, system.command.token);
+ const hook = new WebhookClient({
+ token: system.command.token,
+ id: system.command.id,
+ });
await hook.send({
- avatarURL: global.zuly.user.avatarURL,
+ avatarURL: global.zuly.user.displayAvatarURL(),
username: global.zuly.user.username,
embeds: [embed.get()]
});
});
}
catch (e) {
+ console.log(e);
const system = require('../Config/system');
- const { domain } = require('../Config/config');
- const dominio = domain.replace('http://', '').replace('/', '');
const errorMessage = e.stack.length > 1800 ? `${e.stack.slice(0, 1800)}...` : e.stack;
const embed = new global.zuly.manager.Ebl();
embed.setTitle(`<:zu_error:900785481283944500> ${idioma.message.e}`);
embed.setColor('#ff0000');
- embed.setDescription(`\`\`\`js\n${errorMessage.replace(dominio, '127.0.0.1:3000')}\`\`\``);
+ embed.setDescription(`\`\`\`js\n${errorMessage}\`\`\``);
embed.addField(`<:zu_bughunter_1:885918998426951721> ${idioma.message.e2}`, idioma.message.e3);
- embed.setThumbnail(global.zuly.user.avatarURL);
- embed.setFooter('⤷ zulybot.xyz', global.zuly.user.avatarURL);
+ embed.setThumbnail(global.zuly.user.displayAvatarURL({ dynamic: true, format: 'png', size: 4096 }));
+ embed.setFooter('⤷ zulybot.xyz', global.zuly.user.displayAvatarURL({ dynamic: true, format: 'png', size: 4096 }));
msg.channel.slashReply({
- content: msg.author,
+ content: msg.author.mention,
embeds: [embed.get()]
});
const moment = require('moment');
- const owner = await msg.guild.fetchOwner();
+ const ownerA = await msg.guild.fetchOwner();
+ const owner = ownerA.user;
const embed2 = new global.zuly.manager.Ebl();
embed2.setTitle(`<:zu_error:900785481283944500> ${idioma.message.e}`);
- embed2.setDescription(`\`\`\`js\n${errorMessage.replace(dominio, '127.0.0.1:3000')}\`\`\``);
+ embed2.setDescription(`\`\`\`js\n${errorMessage}\`\`\``);
embed2.addField('<:zu_bughunter_1:885918998426951721> Resolvam!', `>>> 🌎 **Servidor:** \`${msg.guild.name}\`\n🧭 **ID:** \`${msg.guild.id}\`\n👑 **Dono:** \`${owner.username}#${owner.discriminator} [${owner.id}]\`\n🔍 **Membros:** \`${msg.guild.memberCount} members\`\n **Boosts:** \`${msg.guild.premiumSubscriptionCount} boosts\`\n:calendar: **Criado em:** \`${moment(msg.guild.createdAt).format('📆 DD/MM/YY')} | ${moment(msg.guild.createdAt).format('⏰ HH:mm:ss')}\`\n🗺️ **Idioma:** \`${msg.guild.preferredLocale}\`\n<:zu_slash:886681118470987967> **Comando:** \`${interaction.commandName}\`\n💻 **Argumentos:** \`${args.slice(0, 1024) || 'Não Tem'}\``);
embed2.setColor('#ff0000');
- embed2.setThumbnail(global.zuly.user.avatarURL);
- embed.setFooter('⤷ zulybot.xyz', global.zuly.user.avatarURL);
+ embed2.setThumbnail(global.zuly.user.displayAvatarURL({ dynamic: true, format: 'png', size: 4096 }));
+ embed.setFooter('⤷ zulybot.xyz', global.zuly.user.displayAvatarURL({ dynamic: true, format: 'png', size: 4096 }));
- const { WebhookClient } = require('discord.js');
- const hook2 = new WebhookClient(system.error.id, system.error.token);
+ const hook2 = new WebhookClient({
+ id: system.error.id,
+ token: system.error.token
+ });
await hook2.send({
- avatarURL: global.zuly.user.avatarURL,
+ avatarURL: global.zuly.user.displayAvatarURL({ dynamic: true, format: 'png', size: 4096 }),
username: global.zuly.user.username,
content: '<@&886680759237226556>',
embeds: [embed2.get()]
diff --git a/src/Events/messageCreate.js b/src/Events/messageCreate.js
index eb37de2a..5e3020d7 100644
--- a/src/Events/messageCreate.js
+++ b/src/Events/messageCreate.js
@@ -45,10 +45,10 @@ module.exports = class MessageCreateEvent {
if (message.content === `<@${global.zuly.user.id}>` || message.content === `<@!${global.zuly.user.id}>`) {
const embed = new global.zuly.manager.Ebl();
- embed.setAuthor(global.zuly.user.username, '', global.zuly.user.avatarURL);
+ embed.setAuthor(global.zuly.user.username, '', global.zuly.user.displayAvatarURL({ dynamic: true, format: 'png', size: 4096 }));
embed.setDescription(`👋 ${idioma.hello.replace('%user', message.author)}\n> <:zu_info:911303533859590144> ${idioma.about}\n> <:zu_slash:886681118470987967> ${idioma.help}`);
embed.setColor('#ffcbdb');
- embed.setFooter('⤷ zulybot.xyz', global.zuly.user.avatarURL);
+ embed.setFooter('⤷ zulybot.xyz', global.zuly.user.displayAvatarURL({ dynamic: true, format: 'png', size: 4096 }));
message.channel.createMessage({
content: message.author,
embeds: [embed.get()],
@@ -94,8 +94,8 @@ module.exports = class MessageCreateEvent {
embed.setTitle(`<:zu_slash:886288977668243566> SlashCommands | ${global.zuly.user.username}`);
embed.setDescription(`${message.author}, ${idioma.slash}`);
embed.setColor('#ffcbdb');
- embed.setThumbnail(global.zuly.user.avatarURL);
- embed.setFooter('⤷ zulybot.xyz', global.zuly.user.avatarURL);
+ embed.setThumbnail(global.zuly.user.displayAvatarURL({ dynamic: true, format: 'png', size: 4096 }));
+ embed.setFooter('⤷ zulybot.xyz', global.zuly.user.displayAvatarURL({ dynamic: true, format: 'png', size: 4096 }));
message.channel.createMessage({
content: message.author,
embeds: [embed.get()]
diff --git a/src/Events/messageDelete.js b/src/Events/messageDelete.js
deleted file mode 100644
index 6704fc6f..00000000
--- a/src/Events/messageDelete.js
+++ /dev/null
@@ -1,47 +0,0 @@
-/* eslint-disable no-unused-vars */
-module.exports = class MessageDeleteEvent {
- constructor () {
- return {
- nome: 'messageDelete',
- run: this.run
- };
- }
- async run (newMessage) {
- /*
- const channelDB = await global.zuly.db.get(`logs-${newmessage.guild.id}`) || '927209681754132530';
- const channel = await global.zuly.getRESTChannel(channelDB);
- if (newMessage.author.bot) return;
- if (newMessage.author.id === global.zuly.user.id) return;
-
- let idioma = require('../Config/idiomas');
- let lang = await global.zuly.db.get(`idioma-${newmessage.guild.id}`) || 'pt_br';
- lang = lang.replace(/-/g, '_');
- idioma = idioma[lang];
-
- const embed = new global.zuly.manager.Ebl();
- embed.setTitle(`${newMessage.author.username}#${newMessage.author.discriminator} | ${idioma.logs.message.title}`);
- embed.addField(`📝 ${idioma.logs.deleted}`, `\`\`\`${newMessage.content}\`\`\``, true);
- embed.addField(`<:zu_logs_channel:910218450415255593> ${idioma.logs.channel}`, `<#${newMessage.channel.id}> \`(${newMessage.channel.name} [${newMessage.channel.id}])\``);
- embed.addField(`<:zu_link:927212474573418517> ${idioma.logs.url}`, `${newMessage.jumpLink}`);
- embed.setColor('#E74C3C');
- embed.setFooter('⤷ zulybot.xyz', global.zuly.user.avatarURL);
- channel.createMessage({
- embeds: [embed.get()],
- components: [
- {
- type: 1,
- components: [
- {
- type: 2,
- label: idioma.logs.jump,
- style: 5,
- url: `${newMessage.jumpLink}`,
- disabled: true
- }
- ]
- }
- ]
- });
- */
- }
-};
diff --git a/src/Events/messageReactionAdd.js b/src/Events/messageReactionAdd.js
index 7925a3c4..964975f6 100644
--- a/src/Events/messageReactionAdd.js
+++ b/src/Events/messageReactionAdd.js
@@ -5,14 +5,18 @@ module.exports = class MessageReactionAddEvent {
run: this.run
};
}
- async run (message, emoji, member) {
+ async run (message, member) {
+ const emoji = message._emoji;
const system = require('../Config/system.js');
if (member.bot) return;
const rr = await global.zuly.db.get(`reaction-${emoji.name}-${message.id}`);
if (rr) {
await member.addRole(rr, `ReactionRole - ${global.zuly.user.username}`).then(async () => {
- await global.zuly.executeWebhook(system.reactionRole.id, system.reactionRole.token, {
- avatarURL: global.zuly.user.avatarURL,
+ const { WebhookClient } = require('discord.js');
+ const hook = new WebhookClient(system.reactionRole.id, system.reactionRole.token);
+
+ await hook.send({
+ avatarURL: global.zuly.user.displayAvatarURL({ dynamic: true, format: 'png', size: 4096 }),
username: global.zuly.user.username,
content: `> 💼 **ReactionRole** | O Usuário \`${member.user.username}#${member.user.discriminator} (${member.user.id})\` ganhou o cargo de id \`${rr}\` no servidor \`${message.guild.name}\` através do sistema de reactionrole.`
});
diff --git a/src/Events/messageReactionRemove.js b/src/Events/messageReactionRemove.js
index c900b1b7..cbf5d0a2 100644
--- a/src/Events/messageReactionRemove.js
+++ b/src/Events/messageReactionRemove.js
@@ -13,7 +13,7 @@ module.exports = class MessageReactionRemoveEvent {
if (rr) {
await member.removeRole(rr, `ReactionRole - ${global.zuly.user.username}`).then(async () => {
await global.zuly.executeWebhook(system.reactionRole.id, system.reactionRole.token, {
- avatarURL: global.zuly.user.avatarURL,
+ avatarURL: global.zuly.user.displayAvatarURL({ dynamic: true, format: 'png', size: 4096 }),
username: global.zuly.user.username,
content: `> 💼 **ReactionRole** | O Usuário \`${member.user.username}#${member.user.discriminator} (${member.user.id})\` perdeu o cargo de id \`${rr}\` no servidor \`${message.guild.name}\` através do sistema de reactionrole.`
});
diff --git a/src/Events/messageUpdate.js b/src/Events/messageUpdate.js
deleted file mode 100644
index e9f07717..00000000
--- a/src/Events/messageUpdate.js
+++ /dev/null
@@ -1,50 +0,0 @@
-/* eslint-disable no-unused-vars */
-module.exports = class MessageUpdateEvent {
- constructor () {
- return {
- nome: 'messageUpdate',
- run: this.run
- };
- }
- async run (message, oldMessage) {
- /*
- const newMessage = await global.zuly.getMessage(message.channel.id, message.id);
- const channelDB = await global.zuly.db.get(`logs-${newmessage.guild.id}`) || '927209681754132530';
- const channel = await global.zuly.getRESTChannel(channelDB);
- if (newMessage.author.bot) return;
- if (newMessage.content === oldMessage.content) return;
- if (newMessage.author.id === global.zuly.user.id) return;
-
- let idioma = require('../Config/idiomas');
- let lang = await global.zuly.db.get(`idioma-${newmessage.guild.id}`) || 'pt_br';
- lang = lang.replace(/-/g, '_');
- idioma = idioma[lang];
-
- const embed = new global.zuly.manager.Ebl();
- embed.setTitle(`${newMessage.author.username}#${newMessage.author.discriminator} | ${idioma.logs.message.title}`);
- embed.addField(`📝 ${idioma.logs.oldMessage}`, `\`\`\`${oldMessage.content}\`\`\``, true);
- embed.addField(`📝 ${idioma.logs.newMessage}`, `\`\`\`${newMessage.content}\`\`\``, true);
- embed.addField(`<:zu_logs_channel:910218450415255593> ${idioma.logs.channel}`, `<#${newMessage.channel.id}> \`(${newMessage.channel.name} [${newMessage.channel.id}])\``);
- embed.addField(`<:zu_link:927212474573418517> ${idioma.logs.url}`, `${newMessage.jumpLink}`);
- embed.setColor('#FFFF00');
- embed.setFooter('⤷ zulybot.xyz', global.zuly.user.avatarURL);
- channel.createMessage({
- embeds: [embed.get()],
- components: [
- {
- type: 1,
- components: [
- {
- type: 2,
- label: idioma.logs.jump,
- style: 5,
- url: `${newMessage.jumpLink}`,
- disabled: false
- }
- ]
- }
- ]
- });
- */
- }
-};
diff --git a/src/Events/ready.js b/src/Events/ready.js
index c2ca16ac..6a1e68db 100644
--- a/src/Events/ready.js
+++ b/src/Events/ready.js
@@ -21,7 +21,8 @@ module.exports = class ReadyEvent {
const status = [`zulybot.xyz | ${global.zuly.user.username} [v${version}]`, `I'm on ${global.zuly.guilds.cache.size} servers | ${global.zuly.user.username} [v${version}]`, `Follow me on twitter @ZulyBot | ${global.zuly.user.username} [v${version}]`, `/help | ${global.zuly.user.username} [v${version}]`, `/upvote | ${global.zuly.user.username} [v${version}]`, `/invite | ${global.zuly.user.username} [v${version}]`, `Join in my support server discord.gg/pyyyJpw5QW | ${global.zuly.user.username} [v${version}]`, `I was created by: ${adg.username}#${adg.discriminator}`];
const presence = ['online', 'idle', 'dnd'];
setInterval(async () => {
- global.zuly.editStatus(presence[Math.floor(Math.random() * presence.length)], {
+ global.zuly.user.setStatus(presence[Math.floor(Math.random() * presence.length)]);
+ global.zuly.user.setActivity(status[Math.floor(Math.random() * status.length)], {
game: global.zuly.user.username,
name: status[Math.floor(Math.random() * status.length)],
type: 5
diff --git a/src/Integrations/BotLists.js b/src/Integrations/BotLists.js
index 5563c3f5..b671fa6e 100644
--- a/src/Integrations/BotLists.js
+++ b/src/Integrations/BotLists.js
@@ -8,13 +8,13 @@ module.exports = (app) => {
if (req.headers.authorization !== config.secrets.topgg) return;
res.sendStatus(200);
const data = req.body;
- const ch = await global.zuly.getRESTChannel('890316877031698464');
+ const ch = await global.zuly.channels.cache.get('890316877031698464');
const user = await global.zuly.users.fetch(data.user);
const embed = new global.zuly.manager.Ebl();
embed.setTitle(`<:zu_dbl2:908072247498010654> Top.gg | ${global.zuly.user.username}`);
embed.setUrl('https://top.gg/bot/880173509077266483');
embed.setColor('#ffcbdb');
- embed.setThumbnail(user.avatarURL || global.zuly.user.avatarURL);
+ embed.setThumbnail(user.displayAvatarURL({ dynamic: true, format: 'png', size: 4096 }) || global.zuly.user.displayAvatarURL({ dynamic: true, format: 'png', size: 4096 }));
embed.setDescription(`⬆️ \`${user.username}#${user.discriminator}\` votou em mim no **[top.gg](https://top.gg/bot/880173509077266483)** e recebeu **2400 ryos** vote você também!\n🔗 **Link:** https://top.gg/bot/880173509077266483`);
ch.createMessage({
content: `<@${data.user}>`,
@@ -34,7 +34,7 @@ module.exports = (app) => {
embed2.setUrl('https://top.gg/bot/880173509077266483');
embed2.setDescription(`**${user.username}** Obrigado pelo seu voto, como recompensa você recebeu **2400 ryos**, continue votando e sendo uma pessoa incrivel <:zu_yay:890317605318058035>`);
embed2.setColor('#ffcbdb');
- embed2.setThumbnail(global.zuly.user.avatarURL);
+ embed2.setThumbnail(global.zuly.user.displayAvatarURL({ dynamic: true, format: 'png', size: 4096 }));
const dm = await global.zuly.getDMChannel(user.id);
dm.createMessage({
content: user,
diff --git a/src/Locales/en-US.js b/src/Locales/en-US.js
index 8fba3c21..c695ae34 100644
--- a/src/Locales/en-US.js
+++ b/src/Locales/en-US.js
@@ -143,7 +143,7 @@ module.exports = {
term: 'Ended at',
host: 'Hosted by: {user}',
win: 'winner(s)',
- wins: 'Congratulations, {winners}! You won **{prize}**!\n{messageURL}',
+ wins: 'Congratulations, {winners}! You won **{this.prize}**!\n{this.messageURL}',
addReaction: 'addReaction with 🎁 to participate!',
restante: 'Time remaining:',
no: 'Giveaway cancelled, no valid participations',
@@ -152,7 +152,7 @@ module.exports = {
start: 'You did not use the command correctly, use: `%pgiveaway [time (10s, 10m)] [winners (1, 1w)] [prize (photos of kittens)]`, do not include **[]** or **()**.',
end: 'You didn\'t use the command correctly, use: `%pgiveaway-end [message id]`',
reroll: 'You didn\'t use the command correctly, use: `%pgiveaway-reroll [message id]`',
- novo: 'New winner(s): {winners}! Congratulations, you won **{prize}**\n{messageURL}',
+ novo: 'New winner(s): {winners}! Congratulations, you won **{this.prize}**\n{this.messageURL}',
err: 'No valid participations, no new winner(s) can be chosen!'
},
help: {
diff --git a/src/Locales/fr-FR.js b/src/Locales/fr-FR.js
index 378e40f0..3efb7421 100644
--- a/src/Locales/fr-FR.js
+++ b/src/Locales/fr-FR.js
@@ -137,7 +137,7 @@ module.exports = {
term: 'Terminé à',
host: 'Hébergé par: {user}',
win: 'gagnant(s)',
- wins: 'Félicitations, {winners}! Vous avez gagné **{prize}**!\n{messageURL}',
+ wins: 'Félicitations, {winners}! Vous avez gagné **{this.prize}**!\n{this.messageURL}',
addReaction: 'Réagissez avec 🎉 pour participer!',
restante: 'Temps restant:',
no: 'Giveawy annulé, aucune participation valide.',
@@ -146,7 +146,7 @@ module.exports = {
start: 'Vous n\'avez pas utilisé la commande correctement, utilisez : `%pgiveaway [temps (10s, 10m)] [gagnants (1, 1w)] [prix (photos de chats)]`, n\'incluez pas **[]** ou **()**.',
end: 'Você não usou o comando corretamente, utilize: `%pgiveaway-end [id da mensagem]`',
reroll: 'Vous n\'avez pas utilisé la commande correctement, utilisez : `%pgiveaway-reroll [id du message]`',
- novo: 'Nouveau(x) gagnant(s) : {winners}! Félicitations, vous avez gagné **{prize}**\n{messageURL}',
+ novo: 'Nouveau(x) gagnant(s) : {winners}! Félicitations, vous avez gagné **{this.prize}**\n{this.messageURL}',
err: 'Aucune participation valide, aucun nouveau gagnant ne peut être choisi!'
},
help: {
diff --git a/src/Locales/pt-BR.js b/src/Locales/pt-BR.js
index d744c8f3..d836cda2 100644
--- a/src/Locales/pt-BR.js
+++ b/src/Locales/pt-BR.js
@@ -143,7 +143,7 @@ module.exports = {
term: 'Terminou ás',
host: 'Sorteio de: {user}',
win: 'ganhador(es)',
- wins: 'Parabéns, {winners}! Você ganhou **{prize}**!\n{messageURL}',
+ wins: 'Parabéns, {winners}! Você ganhou **{this.prize}**!\n{this.messageURL}',
addReaction: 'Reaja com 🎁 para participar!',
restante: 'Tempo Restante:',
no: 'Sorteio cancelado, sem participações válidas',
@@ -152,7 +152,7 @@ module.exports = {
start: 'Você não usou o comando corretamente, utilize: `%pgiveaway-start [tempo(10s, 10m)] [ganhadores(1, 1w)] [prêmio(fotos de gatinhos)]`, não inclua **[]** ou **()**.',
end: 'Você não usou o comando corretamente, utilize: `%pgiveaway-end [id da mensagem]`',
reroll: 'Você não usou o comando corretamente, utilize: `%pgiveaway-reroll [id da mensagem]`',
- novo: 'Novo ganhador(es): {winners}! Parabéns, vocês ganharam **{prize}**\n{messageURL}',
+ novo: 'Novo ganhador(es): {winners}! Parabéns, vocês ganharam **{this.prize}**\n{this.messageURL}',
err: 'Sem participações válidas, nenhum(s) novo(s) vencedor(es) escolhidos!'
},
help: {
diff --git a/src/Translations/af-ZA.js b/src/Translations/af-ZA.js
index 234e3445..2d74b294 100644
--- a/src/Translations/af-ZA.js
+++ b/src/Translations/af-ZA.js
@@ -191,7 +191,7 @@ module.exports = {
term: 'Ended at',
host: 'Hosted by: {user}',
win: 'winner(s)',
- wins: 'Congratulations, {winners}! You won **{prize}**!\n{messageURL}',
+ wins: 'Congratulations, {winners}! You won **{this.prize}**!\n{this.messageURL}',
addReaction: 'addReaction with 🎁 to participate!',
restante: 'Time remaining:',
no: 'Giveaway cancelled, no valid participations',
@@ -200,7 +200,7 @@ module.exports = {
start: 'You did not use the command correctly, use: `%pgiveaway [time (10s, 10m)] [winners (1, 1w)] [prize (photos of kittens)]`, do not include **[]** or **()**.',
end: 'You didn\'t use the command correctly, use: `%pgiveaway-end [message id]`',
reroll: 'You didn\'t use the command correctly, use: `%pgiveaway-reroll [message id]`',
- novo: 'New winner(s): {winners}! Congratulations, you won **{prize}**\n{messageURL}',
+ novo: 'New winner(s): {winners}! Congratulations, you won **{this.prize}**\n{this.messageURL}',
err: 'No valid participations, no new winner(s) can be chosen!'
},
help: {
diff --git a/src/Translations/ar-SA.js b/src/Translations/ar-SA.js
index 234e3445..2d74b294 100644
--- a/src/Translations/ar-SA.js
+++ b/src/Translations/ar-SA.js
@@ -191,7 +191,7 @@ module.exports = {
term: 'Ended at',
host: 'Hosted by: {user}',
win: 'winner(s)',
- wins: 'Congratulations, {winners}! You won **{prize}**!\n{messageURL}',
+ wins: 'Congratulations, {winners}! You won **{this.prize}**!\n{this.messageURL}',
addReaction: 'addReaction with 🎁 to participate!',
restante: 'Time remaining:',
no: 'Giveaway cancelled, no valid participations',
@@ -200,7 +200,7 @@ module.exports = {
start: 'You did not use the command correctly, use: `%pgiveaway [time (10s, 10m)] [winners (1, 1w)] [prize (photos of kittens)]`, do not include **[]** or **()**.',
end: 'You didn\'t use the command correctly, use: `%pgiveaway-end [message id]`',
reroll: 'You didn\'t use the command correctly, use: `%pgiveaway-reroll [message id]`',
- novo: 'New winner(s): {winners}! Congratulations, you won **{prize}**\n{messageURL}',
+ novo: 'New winner(s): {winners}! Congratulations, you won **{this.prize}**\n{this.messageURL}',
err: 'No valid participations, no new winner(s) can be chosen!'
},
help: {
diff --git a/src/Translations/ca-ES.js b/src/Translations/ca-ES.js
index 234e3445..2d74b294 100644
--- a/src/Translations/ca-ES.js
+++ b/src/Translations/ca-ES.js
@@ -191,7 +191,7 @@ module.exports = {
term: 'Ended at',
host: 'Hosted by: {user}',
win: 'winner(s)',
- wins: 'Congratulations, {winners}! You won **{prize}**!\n{messageURL}',
+ wins: 'Congratulations, {winners}! You won **{this.prize}**!\n{this.messageURL}',
addReaction: 'addReaction with 🎁 to participate!',
restante: 'Time remaining:',
no: 'Giveaway cancelled, no valid participations',
@@ -200,7 +200,7 @@ module.exports = {
start: 'You did not use the command correctly, use: `%pgiveaway [time (10s, 10m)] [winners (1, 1w)] [prize (photos of kittens)]`, do not include **[]** or **()**.',
end: 'You didn\'t use the command correctly, use: `%pgiveaway-end [message id]`',
reroll: 'You didn\'t use the command correctly, use: `%pgiveaway-reroll [message id]`',
- novo: 'New winner(s): {winners}! Congratulations, you won **{prize}**\n{messageURL}',
+ novo: 'New winner(s): {winners}! Congratulations, you won **{this.prize}**\n{this.messageURL}',
err: 'No valid participations, no new winner(s) can be chosen!'
},
help: {
diff --git a/src/Translations/cs-CZ.js b/src/Translations/cs-CZ.js
index 234e3445..2d74b294 100644
--- a/src/Translations/cs-CZ.js
+++ b/src/Translations/cs-CZ.js
@@ -191,7 +191,7 @@ module.exports = {
term: 'Ended at',
host: 'Hosted by: {user}',
win: 'winner(s)',
- wins: 'Congratulations, {winners}! You won **{prize}**!\n{messageURL}',
+ wins: 'Congratulations, {winners}! You won **{this.prize}**!\n{this.messageURL}',
addReaction: 'addReaction with 🎁 to participate!',
restante: 'Time remaining:',
no: 'Giveaway cancelled, no valid participations',
@@ -200,7 +200,7 @@ module.exports = {
start: 'You did not use the command correctly, use: `%pgiveaway [time (10s, 10m)] [winners (1, 1w)] [prize (photos of kittens)]`, do not include **[]** or **()**.',
end: 'You didn\'t use the command correctly, use: `%pgiveaway-end [message id]`',
reroll: 'You didn\'t use the command correctly, use: `%pgiveaway-reroll [message id]`',
- novo: 'New winner(s): {winners}! Congratulations, you won **{prize}**\n{messageURL}',
+ novo: 'New winner(s): {winners}! Congratulations, you won **{this.prize}**\n{this.messageURL}',
err: 'No valid participations, no new winner(s) can be chosen!'
},
help: {
diff --git a/src/Translations/da-DK.js b/src/Translations/da-DK.js
index 234e3445..2d74b294 100644
--- a/src/Translations/da-DK.js
+++ b/src/Translations/da-DK.js
@@ -191,7 +191,7 @@ module.exports = {
term: 'Ended at',
host: 'Hosted by: {user}',
win: 'winner(s)',
- wins: 'Congratulations, {winners}! You won **{prize}**!\n{messageURL}',
+ wins: 'Congratulations, {winners}! You won **{this.prize}**!\n{this.messageURL}',
addReaction: 'addReaction with 🎁 to participate!',
restante: 'Time remaining:',
no: 'Giveaway cancelled, no valid participations',
@@ -200,7 +200,7 @@ module.exports = {
start: 'You did not use the command correctly, use: `%pgiveaway [time (10s, 10m)] [winners (1, 1w)] [prize (photos of kittens)]`, do not include **[]** or **()**.',
end: 'You didn\'t use the command correctly, use: `%pgiveaway-end [message id]`',
reroll: 'You didn\'t use the command correctly, use: `%pgiveaway-reroll [message id]`',
- novo: 'New winner(s): {winners}! Congratulations, you won **{prize}**\n{messageURL}',
+ novo: 'New winner(s): {winners}! Congratulations, you won **{this.prize}**\n{this.messageURL}',
err: 'No valid participations, no new winner(s) can be chosen!'
},
help: {
diff --git a/src/Translations/de-DE.js b/src/Translations/de-DE.js
index f2feeb13..c0b44b48 100644
--- a/src/Translations/de-DE.js
+++ b/src/Translations/de-DE.js
@@ -191,7 +191,7 @@ module.exports = {
term: 'Terminou ás',
host: 'Sorteio de: {user}',
win: 'ganhador(es)',
- wins: 'Parabéns, {winners}! Você ganhou **{prize}**!\n{messageURL}',
+ wins: 'Parabéns, {winners}! Você ganhou **{this.prize}**!\n{this.messageURL}',
addReaction: 'Reaja com 🎁 para participar!',
restante: 'Tempo Restante:',
no: 'Sorteio cancelado, sem participações válidas',
@@ -200,7 +200,7 @@ module.exports = {
start: 'Você não usou o comando corretamente, utilize: `%pgiveaway-start [tempo(10s, 10m)] [ganhadores(1, 1w)] [prêmio(fotos de gatinhos)]`, não inclua **[]** ou **()**.',
end: 'Você não usou o comando corretamente, utilize: `%pgiveaway-end [id da mensagem]`',
reroll: 'Você não usou o comando corretamente, utilize: `%pgiveaway-reroll [id da mensagem]`',
- novo: 'Novo ganhador(es): {winners}! Parabéns, vocês ganharam **{prize}**\n{messageURL}',
+ novo: 'Novo ganhador(es): {winners}! Parabéns, vocês ganharam **{this.prize}**\n{this.messageURL}',
err: 'Sem participações válidas, nenhum(s) novo(s) vencedor(es) escolhidos!'
},
help: {
diff --git a/src/Translations/el-GR.js b/src/Translations/el-GR.js
index 234e3445..2d74b294 100644
--- a/src/Translations/el-GR.js
+++ b/src/Translations/el-GR.js
@@ -191,7 +191,7 @@ module.exports = {
term: 'Ended at',
host: 'Hosted by: {user}',
win: 'winner(s)',
- wins: 'Congratulations, {winners}! You won **{prize}**!\n{messageURL}',
+ wins: 'Congratulations, {winners}! You won **{this.prize}**!\n{this.messageURL}',
addReaction: 'addReaction with 🎁 to participate!',
restante: 'Time remaining:',
no: 'Giveaway cancelled, no valid participations',
@@ -200,7 +200,7 @@ module.exports = {
start: 'You did not use the command correctly, use: `%pgiveaway [time (10s, 10m)] [winners (1, 1w)] [prize (photos of kittens)]`, do not include **[]** or **()**.',
end: 'You didn\'t use the command correctly, use: `%pgiveaway-end [message id]`',
reroll: 'You didn\'t use the command correctly, use: `%pgiveaway-reroll [message id]`',
- novo: 'New winner(s): {winners}! Congratulations, you won **{prize}**\n{messageURL}',
+ novo: 'New winner(s): {winners}! Congratulations, you won **{this.prize}**\n{this.messageURL}',
err: 'No valid participations, no new winner(s) can be chosen!'
},
help: {
diff --git a/src/Translations/es-ES.js b/src/Translations/es-ES.js
index f4041b26..afc63826 100644
--- a/src/Translations/es-ES.js
+++ b/src/Translations/es-ES.js
@@ -191,7 +191,7 @@ module.exports = {
term: 'Terminou ás',
host: 'Sorteio de: {user}',
win: 'ganhador(es)',
- wins: 'Parabéns, {winners}! Você ganhou **{prize}**!\n{messageURL}',
+ wins: 'Parabéns, {winners}! Você ganhou **{this.prize}**!\n{this.messageURL}',
addReaction: 'Reaja com 🎁 para participar!',
restante: 'Tempo Restante:',
no: 'Sorteio cancelado, sem participações válidas',
@@ -200,7 +200,7 @@ module.exports = {
start: 'Você não usou o comando corretamente, utilize: `%pgiveaway-start [tempo(10s, 10m)] [ganhadores(1, 1w)] [prêmio(fotos de gatinhos)]`, não inclua **[]** ou **()**.',
end: 'Você não usou o comando corretamente, utilize: `%pgiveaway-end [id da mensagem]`',
reroll: 'Você não usou o comando corretamente, utilize: `%pgiveaway-reroll [id da mensagem]`',
- novo: 'Novo ganhador(es): {winners}! Parabéns, vocês ganharam **{prize}**\n{messageURL}',
+ novo: 'Novo ganhador(es): {winners}! Parabéns, vocês ganharam **{this.prize}**\n{this.messageURL}',
err: 'Sem participações válidas, nenhum(s) novo(s) vencedor(es) escolhidos!'
},
help: {
diff --git a/src/Translations/fi-FI.js b/src/Translations/fi-FI.js
index 234e3445..2d74b294 100644
--- a/src/Translations/fi-FI.js
+++ b/src/Translations/fi-FI.js
@@ -191,7 +191,7 @@ module.exports = {
term: 'Ended at',
host: 'Hosted by: {user}',
win: 'winner(s)',
- wins: 'Congratulations, {winners}! You won **{prize}**!\n{messageURL}',
+ wins: 'Congratulations, {winners}! You won **{this.prize}**!\n{this.messageURL}',
addReaction: 'addReaction with 🎁 to participate!',
restante: 'Time remaining:',
no: 'Giveaway cancelled, no valid participations',
@@ -200,7 +200,7 @@ module.exports = {
start: 'You did not use the command correctly, use: `%pgiveaway [time (10s, 10m)] [winners (1, 1w)] [prize (photos of kittens)]`, do not include **[]** or **()**.',
end: 'You didn\'t use the command correctly, use: `%pgiveaway-end [message id]`',
reroll: 'You didn\'t use the command correctly, use: `%pgiveaway-reroll [message id]`',
- novo: 'New winner(s): {winners}! Congratulations, you won **{prize}**\n{messageURL}',
+ novo: 'New winner(s): {winners}! Congratulations, you won **{this.prize}**\n{this.messageURL}',
err: 'No valid participations, no new winner(s) can be chosen!'
},
help: {
diff --git a/src/Translations/fr-FR.js b/src/Translations/fr-FR.js
index feaad921..b3c58ab6 100644
--- a/src/Translations/fr-FR.js
+++ b/src/Translations/fr-FR.js
@@ -191,7 +191,7 @@ module.exports = {
term: 'Terminé à',
host: 'Hébergé par: {user}',
win: 'gagnant(s)',
- wins: 'Félicitations, {winners}! Vous avez gagné **{prize}**!\n{messageURL}',
+ wins: 'Félicitations, {winners}! Vous avez gagné **{this.prize}**!\n{this.messageURL}',
addReaction: 'Réagissez avec 🎉 pour participer!',
restante: 'Temps restant:',
no: 'Giveawy annulé, aucune participation valide.',
@@ -200,7 +200,7 @@ module.exports = {
start: 'Vous n\'avez pas utilisé la commande correctement, utilisez : `%pgiveaway [temps (10s, 10m)] [gagnants (1, 1w)] [prix (photos de chats)]`, n\'incluez pas **[]** ou **()**.',
end: 'Você não usou o comando corretamente, utilize: `%pgiveaway-end [id da mensagem]`',
reroll: 'Vous n\'avez pas utilisé la commande correctement, utilisez : `%pgiveaway-reroll [id du message]`',
- novo: 'Nouveau(x) gagnant(s) : {winners}! Félicitations, vous avez gagné **{prize}**\n{messageURL}',
+ novo: 'Nouveau(x) gagnant(s) : {winners}! Félicitations, vous avez gagné **{this.prize}**\n{this.messageURL}',
err: 'Aucune participation valide, aucun nouveau gagnant ne peut être choisi!'
},
help: {
diff --git a/src/Translations/he-IL.js b/src/Translations/he-IL.js
index 234e3445..2d74b294 100644
--- a/src/Translations/he-IL.js
+++ b/src/Translations/he-IL.js
@@ -191,7 +191,7 @@ module.exports = {
term: 'Ended at',
host: 'Hosted by: {user}',
win: 'winner(s)',
- wins: 'Congratulations, {winners}! You won **{prize}**!\n{messageURL}',
+ wins: 'Congratulations, {winners}! You won **{this.prize}**!\n{this.messageURL}',
addReaction: 'addReaction with 🎁 to participate!',
restante: 'Time remaining:',
no: 'Giveaway cancelled, no valid participations',
@@ -200,7 +200,7 @@ module.exports = {
start: 'You did not use the command correctly, use: `%pgiveaway [time (10s, 10m)] [winners (1, 1w)] [prize (photos of kittens)]`, do not include **[]** or **()**.',
end: 'You didn\'t use the command correctly, use: `%pgiveaway-end [message id]`',
reroll: 'You didn\'t use the command correctly, use: `%pgiveaway-reroll [message id]`',
- novo: 'New winner(s): {winners}! Congratulations, you won **{prize}**\n{messageURL}',
+ novo: 'New winner(s): {winners}! Congratulations, you won **{this.prize}**\n{this.messageURL}',
err: 'No valid participations, no new winner(s) can be chosen!'
},
help: {
diff --git a/src/Translations/hu-HU.js b/src/Translations/hu-HU.js
index 234e3445..2d74b294 100644
--- a/src/Translations/hu-HU.js
+++ b/src/Translations/hu-HU.js
@@ -191,7 +191,7 @@ module.exports = {
term: 'Ended at',
host: 'Hosted by: {user}',
win: 'winner(s)',
- wins: 'Congratulations, {winners}! You won **{prize}**!\n{messageURL}',
+ wins: 'Congratulations, {winners}! You won **{this.prize}**!\n{this.messageURL}',
addReaction: 'addReaction with 🎁 to participate!',
restante: 'Time remaining:',
no: 'Giveaway cancelled, no valid participations',
@@ -200,7 +200,7 @@ module.exports = {
start: 'You did not use the command correctly, use: `%pgiveaway [time (10s, 10m)] [winners (1, 1w)] [prize (photos of kittens)]`, do not include **[]** or **()**.',
end: 'You didn\'t use the command correctly, use: `%pgiveaway-end [message id]`',
reroll: 'You didn\'t use the command correctly, use: `%pgiveaway-reroll [message id]`',
- novo: 'New winner(s): {winners}! Congratulations, you won **{prize}**\n{messageURL}',
+ novo: 'New winner(s): {winners}! Congratulations, you won **{this.prize}**\n{this.messageURL}',
err: 'No valid participations, no new winner(s) can be chosen!'
},
help: {
diff --git a/src/Translations/it-IT.js b/src/Translations/it-IT.js
index 234e3445..2d74b294 100644
--- a/src/Translations/it-IT.js
+++ b/src/Translations/it-IT.js
@@ -191,7 +191,7 @@ module.exports = {
term: 'Ended at',
host: 'Hosted by: {user}',
win: 'winner(s)',
- wins: 'Congratulations, {winners}! You won **{prize}**!\n{messageURL}',
+ wins: 'Congratulations, {winners}! You won **{this.prize}**!\n{this.messageURL}',
addReaction: 'addReaction with 🎁 to participate!',
restante: 'Time remaining:',
no: 'Giveaway cancelled, no valid participations',
@@ -200,7 +200,7 @@ module.exports = {
start: 'You did not use the command correctly, use: `%pgiveaway [time (10s, 10m)] [winners (1, 1w)] [prize (photos of kittens)]`, do not include **[]** or **()**.',
end: 'You didn\'t use the command correctly, use: `%pgiveaway-end [message id]`',
reroll: 'You didn\'t use the command correctly, use: `%pgiveaway-reroll [message id]`',
- novo: 'New winner(s): {winners}! Congratulations, you won **{prize}**\n{messageURL}',
+ novo: 'New winner(s): {winners}! Congratulations, you won **{this.prize}**\n{this.messageURL}',
err: 'No valid participations, no new winner(s) can be chosen!'
},
help: {
diff --git a/src/Translations/ja-JP.js b/src/Translations/ja-JP.js
index ab56d155..543e8814 100644
--- a/src/Translations/ja-JP.js
+++ b/src/Translations/ja-JP.js
@@ -191,7 +191,7 @@ module.exports = {
term: 'Terminou ás',
host: 'Sorteio de: {user}',
win: 'ganhador(es)',
- wins: 'Parabéns, {winners}! Você ganhou **{prize}**!\n{messageURL}',
+ wins: 'Parabéns, {winners}! Você ganhou **{this.prize}**!\n{this.messageURL}',
addReaction: 'Reaja com 🎁 para participar!',
restante: 'Tempo Restante:',
no: 'Sorteio cancelado, sem participações válidas',
@@ -200,7 +200,7 @@ module.exports = {
start: 'Você não usou o comando corretamente, utilize: `%pgiveaway-start [tempo(10s, 10m)] [ganhadores(1, 1w)] [prêmio(fotos de gatinhos)]`, não inclua **[]** ou **()**.',
end: 'Você não usou o comando corretamente, utilize: `%pgiveaway-end [id da mensagem]`',
reroll: 'Você não usou o comando corretamente, utilize: `%pgiveaway-reroll [id da mensagem]`',
- novo: 'Novo ganhador(es): {winners}! Parabéns, vocês ganharam **{prize}**\n{messageURL}',
+ novo: 'Novo ganhador(es): {winners}! Parabéns, vocês ganharam **{this.prize}**\n{this.messageURL}',
err: 'Sem participações válidas, nenhum(s) novo(s) vencedor(es) escolhidos!'
},
help: {
diff --git a/src/Translations/ko-KR.js b/src/Translations/ko-KR.js
index ab56d155..543e8814 100644
--- a/src/Translations/ko-KR.js
+++ b/src/Translations/ko-KR.js
@@ -191,7 +191,7 @@ module.exports = {
term: 'Terminou ás',
host: 'Sorteio de: {user}',
win: 'ganhador(es)',
- wins: 'Parabéns, {winners}! Você ganhou **{prize}**!\n{messageURL}',
+ wins: 'Parabéns, {winners}! Você ganhou **{this.prize}**!\n{this.messageURL}',
addReaction: 'Reaja com 🎁 para participar!',
restante: 'Tempo Restante:',
no: 'Sorteio cancelado, sem participações válidas',
@@ -200,7 +200,7 @@ module.exports = {
start: 'Você não usou o comando corretamente, utilize: `%pgiveaway-start [tempo(10s, 10m)] [ganhadores(1, 1w)] [prêmio(fotos de gatinhos)]`, não inclua **[]** ou **()**.',
end: 'Você não usou o comando corretamente, utilize: `%pgiveaway-end [id da mensagem]`',
reroll: 'Você não usou o comando corretamente, utilize: `%pgiveaway-reroll [id da mensagem]`',
- novo: 'Novo ganhador(es): {winners}! Parabéns, vocês ganharam **{prize}**\n{messageURL}',
+ novo: 'Novo ganhador(es): {winners}! Parabéns, vocês ganharam **{this.prize}**\n{this.messageURL}',
err: 'Sem participações válidas, nenhum(s) novo(s) vencedor(es) escolhidos!'
},
help: {
diff --git a/src/Translations/nl-NL.js b/src/Translations/nl-NL.js
index 234e3445..2d74b294 100644
--- a/src/Translations/nl-NL.js
+++ b/src/Translations/nl-NL.js
@@ -191,7 +191,7 @@ module.exports = {
term: 'Ended at',
host: 'Hosted by: {user}',
win: 'winner(s)',
- wins: 'Congratulations, {winners}! You won **{prize}**!\n{messageURL}',
+ wins: 'Congratulations, {winners}! You won **{this.prize}**!\n{this.messageURL}',
addReaction: 'addReaction with 🎁 to participate!',
restante: 'Time remaining:',
no: 'Giveaway cancelled, no valid participations',
@@ -200,7 +200,7 @@ module.exports = {
start: 'You did not use the command correctly, use: `%pgiveaway [time (10s, 10m)] [winners (1, 1w)] [prize (photos of kittens)]`, do not include **[]** or **()**.',
end: 'You didn\'t use the command correctly, use: `%pgiveaway-end [message id]`',
reroll: 'You didn\'t use the command correctly, use: `%pgiveaway-reroll [message id]`',
- novo: 'New winner(s): {winners}! Congratulations, you won **{prize}**\n{messageURL}',
+ novo: 'New winner(s): {winners}! Congratulations, you won **{this.prize}**\n{this.messageURL}',
err: 'No valid participations, no new winner(s) can be chosen!'
},
help: {
diff --git a/src/Translations/no-NO.js b/src/Translations/no-NO.js
index 234e3445..2d74b294 100644
--- a/src/Translations/no-NO.js
+++ b/src/Translations/no-NO.js
@@ -191,7 +191,7 @@ module.exports = {
term: 'Ended at',
host: 'Hosted by: {user}',
win: 'winner(s)',
- wins: 'Congratulations, {winners}! You won **{prize}**!\n{messageURL}',
+ wins: 'Congratulations, {winners}! You won **{this.prize}**!\n{this.messageURL}',
addReaction: 'addReaction with 🎁 to participate!',
restante: 'Time remaining:',
no: 'Giveaway cancelled, no valid participations',
@@ -200,7 +200,7 @@ module.exports = {
start: 'You did not use the command correctly, use: `%pgiveaway [time (10s, 10m)] [winners (1, 1w)] [prize (photos of kittens)]`, do not include **[]** or **()**.',
end: 'You didn\'t use the command correctly, use: `%pgiveaway-end [message id]`',
reroll: 'You didn\'t use the command correctly, use: `%pgiveaway-reroll [message id]`',
- novo: 'New winner(s): {winners}! Congratulations, you won **{prize}**\n{messageURL}',
+ novo: 'New winner(s): {winners}! Congratulations, you won **{this.prize}**\n{this.messageURL}',
err: 'No valid participations, no new winner(s) can be chosen!'
},
help: {
diff --git a/src/Translations/pl-PL.js b/src/Translations/pl-PL.js
index 283d7d4d..2c89f662 100644
--- a/src/Translations/pl-PL.js
+++ b/src/Translations/pl-PL.js
@@ -191,7 +191,7 @@ module.exports = {
term: 'Ended at',
host: 'Hosted by: {user}',
win: 'winner(s)',
- wins: 'Congratulations, {winners}! You won **{prize}**!\n{messageURL}',
+ wins: 'Congratulations, {winners}! You won **{this.prize}**!\n{this.messageURL}',
addReaction: 'addReaction with 🎁 to participate!',
restante: 'Time remaining:',
no: 'Giveaway cancelled, no valid participations',
@@ -200,7 +200,7 @@ module.exports = {
start: 'You did not use the command correctly, use: `%pgiveaway [time (10s, 10m)] [winners (1, 1w)] [prize (photos of kittens)]`, do not include **[]** or **()**.',
end: 'You didn\'t use the command correctly, use: `%pgiveaway-end [message id]`',
reroll: 'You didn\'t use the command correctly, use: `%pgiveaway-reroll [message id]`',
- novo: 'New winner(s): {winners}! Congratulations, you won **{prize}**\n{messageURL}',
+ novo: 'New winner(s): {winners}! Congratulations, you won **{this.prize}**\n{this.messageURL}',
err: 'No valid participations, no new winner(s) can be chosen!'
},
help: {
diff --git a/src/Translations/pt-BR.js b/src/Translations/pt-BR.js
index 5672289e..6d8f5790 100644
--- a/src/Translations/pt-BR.js
+++ b/src/Translations/pt-BR.js
@@ -31,7 +31,7 @@ module.exports = {
term: 'Terminou ás',
host: 'Sorteio de: {user}',
win: 'ganhador(es)',
- wins: 'Parabéns, {winners}! Você ganhou **{prize}**!\n{messageURL}',
+ wins: 'Parabéns, {winners}! Você ganhou **{this.prize}**!\n{this.messageURL}',
addReaction: 'Reaja com 🎁 para participar!',
restante: 'Tempo Restante:',
no: 'Sorteio cancelado, sem participações válidas',
@@ -40,7 +40,7 @@ module.exports = {
start: 'Você não usou o comando corretamente, utilize: `%pgiveaway-start [tempo(10s, 10m)] [ganhadores(1, 1w)] [prêmio(fotos de gatinhos)]`, não inclua **[]** ou **()**.',
end: 'Você não usou o comando corretamente, utilize: `%pgiveaway-end [id da mensagem]`',
reroll: 'Você não usou o comando corretamente, utilize: `%pgiveaway-reroll [id da mensagem]`',
- novo: 'Novo ganhador(es): {winners}! Parabéns, vocês ganharam **{prize}**\n{messageURL}',
+ novo: 'Novo ganhador(es): {winners}! Parabéns, vocês ganharam **{this.prize}**\n{this.messageURL}',
err: 'Sem participações válidas, nenhum(s) novo(s) vencedor(es) escolhidos!'
},
help: {
diff --git a/src/Translations/ro-RO.js b/src/Translations/ro-RO.js
index b3755760..e8bc15d7 100644
--- a/src/Translations/ro-RO.js
+++ b/src/Translations/ro-RO.js
@@ -191,7 +191,7 @@ module.exports = {
term: 'încheiat la',
host: 'Găzduit de: {user}',
win: 'câştigător(i)',
- wins: 'Felicitări, {winners}! Ai câștigat **{prize}**!\n{messageURL}',
+ wins: 'Felicitări, {winners}! Ai câștigat **{this.prize}**!\n{this.messageURL}',
addReaction: 'adauga reactie cu :wrapped_cadft: pentru a participa!',
restante: 'Timpul rămas',
no: 'Giveaway a fost anulat, nicio participare valabilă',
@@ -200,7 +200,7 @@ module.exports = {
start: 'Nu ai folosit comanda corect, utilizează:%pgiveaway [timp (10), 10m)] [câștigători (1, 1w)] [premiu (fotografii de pisici)]", nu include **[]** sau **()**.',
end: 'Nu ai folosit comanda corect, foloseşte:%pgiveaway-end [message id]`',
reroll: 'Nu ai folosit comanda corect, foloseşte:%pgiveaway-reroll [message id]`',
- novo: 'Câștigători noi: {winners}! Felicitări, ai câștigat **{prize}**\n{messageURL}',
+ novo: 'Câștigători noi: {winners}! Felicitări, ai câștigat **{this.prize}**\n{this.messageURL}',
err: 'Nu se pot alege nici o participare validă, nici un câștigător/câștigători noi!'
},
help: {
diff --git a/src/Translations/ru-RU.js b/src/Translations/ru-RU.js
index 7ad9cac2..71edbf0c 100644
--- a/src/Translations/ru-RU.js
+++ b/src/Translations/ru-RU.js
@@ -191,7 +191,7 @@ module.exports = {
term: 'Terminou ás',
host: 'Sorteio de: {user}',
win: 'ganhador(es)',
- wins: 'Parabéns, {winners}! Você ganhou **{prize}**!\n{messageURL}',
+ wins: 'Parabéns, {winners}! Você ganhou **{this.prize}**!\n{this.messageURL}',
addReaction: 'Reaja com 🎁 para participar!',
restante: 'Tempo Restante:',
no: 'Sorteio cancelado, sem participações válidas',
@@ -200,7 +200,7 @@ module.exports = {
start: 'Você não usou o comando corretamente, utilize: `%pgiveaway-start [tempo(10s, 10m)] [ganhadores(1, 1w)] [prêmio(fotos de gatinhos)]`, não inclua **[]** ou **()**.',
end: 'Você não usou o comando corretamente, utilize: `%pgiveaway-end [id da mensagem]`',
reroll: 'Você não usou o comando corretamente, utilize: `%pgiveaway-reroll [id da mensagem]`',
- novo: 'Novo ganhador(es): {winners}! Parabéns, vocês ganharam **{prize}**\n{messageURL}',
+ novo: 'Novo ganhador(es): {winners}! Parabéns, vocês ganharam **{this.prize}**\n{this.messageURL}',
err: 'Sem participações válidas, nenhum(s) novo(s) vencedor(es) escolhidos!'
},
help: {
diff --git a/src/Translations/sr-SP.js b/src/Translations/sr-SP.js
index 234e3445..2d74b294 100644
--- a/src/Translations/sr-SP.js
+++ b/src/Translations/sr-SP.js
@@ -191,7 +191,7 @@ module.exports = {
term: 'Ended at',
host: 'Hosted by: {user}',
win: 'winner(s)',
- wins: 'Congratulations, {winners}! You won **{prize}**!\n{messageURL}',
+ wins: 'Congratulations, {winners}! You won **{this.prize}**!\n{this.messageURL}',
addReaction: 'addReaction with 🎁 to participate!',
restante: 'Time remaining:',
no: 'Giveaway cancelled, no valid participations',
@@ -200,7 +200,7 @@ module.exports = {
start: 'You did not use the command correctly, use: `%pgiveaway [time (10s, 10m)] [winners (1, 1w)] [prize (photos of kittens)]`, do not include **[]** or **()**.',
end: 'You didn\'t use the command correctly, use: `%pgiveaway-end [message id]`',
reroll: 'You didn\'t use the command correctly, use: `%pgiveaway-reroll [message id]`',
- novo: 'New winner(s): {winners}! Congratulations, you won **{prize}**\n{messageURL}',
+ novo: 'New winner(s): {winners}! Congratulations, you won **{this.prize}**\n{this.messageURL}',
err: 'No valid participations, no new winner(s) can be chosen!'
},
help: {
diff --git a/src/Translations/sv-SE.js b/src/Translations/sv-SE.js
index 234e3445..2d74b294 100644
--- a/src/Translations/sv-SE.js
+++ b/src/Translations/sv-SE.js
@@ -191,7 +191,7 @@ module.exports = {
term: 'Ended at',
host: 'Hosted by: {user}',
win: 'winner(s)',
- wins: 'Congratulations, {winners}! You won **{prize}**!\n{messageURL}',
+ wins: 'Congratulations, {winners}! You won **{this.prize}**!\n{this.messageURL}',
addReaction: 'addReaction with 🎁 to participate!',
restante: 'Time remaining:',
no: 'Giveaway cancelled, no valid participations',
@@ -200,7 +200,7 @@ module.exports = {
start: 'You did not use the command correctly, use: `%pgiveaway [time (10s, 10m)] [winners (1, 1w)] [prize (photos of kittens)]`, do not include **[]** or **()**.',
end: 'You didn\'t use the command correctly, use: `%pgiveaway-end [message id]`',
reroll: 'You didn\'t use the command correctly, use: `%pgiveaway-reroll [message id]`',
- novo: 'New winner(s): {winners}! Congratulations, you won **{prize}**\n{messageURL}',
+ novo: 'New winner(s): {winners}! Congratulations, you won **{this.prize}**\n{this.messageURL}',
err: 'No valid participations, no new winner(s) can be chosen!'
},
help: {
diff --git a/src/Translations/tr-TR.js b/src/Translations/tr-TR.js
index 234e3445..2d74b294 100644
--- a/src/Translations/tr-TR.js
+++ b/src/Translations/tr-TR.js
@@ -191,7 +191,7 @@ module.exports = {
term: 'Ended at',
host: 'Hosted by: {user}',
win: 'winner(s)',
- wins: 'Congratulations, {winners}! You won **{prize}**!\n{messageURL}',
+ wins: 'Congratulations, {winners}! You won **{this.prize}**!\n{this.messageURL}',
addReaction: 'addReaction with 🎁 to participate!',
restante: 'Time remaining:',
no: 'Giveaway cancelled, no valid participations',
@@ -200,7 +200,7 @@ module.exports = {
start: 'You did not use the command correctly, use: `%pgiveaway [time (10s, 10m)] [winners (1, 1w)] [prize (photos of kittens)]`, do not include **[]** or **()**.',
end: 'You didn\'t use the command correctly, use: `%pgiveaway-end [message id]`',
reroll: 'You didn\'t use the command correctly, use: `%pgiveaway-reroll [message id]`',
- novo: 'New winner(s): {winners}! Congratulations, you won **{prize}**\n{messageURL}',
+ novo: 'New winner(s): {winners}! Congratulations, you won **{this.prize}**\n{this.messageURL}',
err: 'No valid participations, no new winner(s) can be chosen!'
},
help: {
diff --git a/src/Translations/uk-UA.js b/src/Translations/uk-UA.js
index 234e3445..2d74b294 100644
--- a/src/Translations/uk-UA.js
+++ b/src/Translations/uk-UA.js
@@ -191,7 +191,7 @@ module.exports = {
term: 'Ended at',
host: 'Hosted by: {user}',
win: 'winner(s)',
- wins: 'Congratulations, {winners}! You won **{prize}**!\n{messageURL}',
+ wins: 'Congratulations, {winners}! You won **{this.prize}**!\n{this.messageURL}',
addReaction: 'addReaction with 🎁 to participate!',
restante: 'Time remaining:',
no: 'Giveaway cancelled, no valid participations',
@@ -200,7 +200,7 @@ module.exports = {
start: 'You did not use the command correctly, use: `%pgiveaway [time (10s, 10m)] [winners (1, 1w)] [prize (photos of kittens)]`, do not include **[]** or **()**.',
end: 'You didn\'t use the command correctly, use: `%pgiveaway-end [message id]`',
reroll: 'You didn\'t use the command correctly, use: `%pgiveaway-reroll [message id]`',
- novo: 'New winner(s): {winners}! Congratulations, you won **{prize}**\n{messageURL}',
+ novo: 'New winner(s): {winners}! Congratulations, you won **{this.prize}**\n{this.messageURL}',
err: 'No valid participations, no new winner(s) can be chosen!'
},
help: {
diff --git a/src/Translations/vi-VN.js b/src/Translations/vi-VN.js
index 4c85ac3d..700bdc92 100644
--- a/src/Translations/vi-VN.js
+++ b/src/Translations/vi-VN.js
@@ -31,7 +31,7 @@ module.exports = {
term: 'Terminou ás',
host: 'Sorteio de: {user}',
win: 'ganhador(es)',
- wins: 'Parabéns, {winners}! Você ganhou **{prize}**!\n{messageURL}',
+ wins: 'Parabéns, {winners}! Você ganhou **{this.prize}**!\n{this.messageURL}',
addReaction: 'Reaja com 🎁 para participar!',
restante: 'Tempo Restante:',
no: 'Sorteio cancelado, sem participações válidas',
@@ -40,7 +40,7 @@ module.exports = {
start: 'Você não usou o comando corretamente, utilize: `%pgiveaway-start [tempo(10s, 10m)] [ganhadores(1, 1w)] [prêmio(fotos de gatinhos)]`, não inclua **[]** ou **()**.',
end: 'Você não usou o comando corretamente, utilize: `%pgiveaway-end [id da mensagem]`',
reroll: 'Você não usou o comando corretamente, utilize: `%pgiveaway-reroll [id da mensagem]`',
- novo: 'Novo ganhador(es): {winners}! Parabéns, vocês ganharam **{prize}**\n{messageURL}',
+ novo: 'Novo ganhador(es): {winners}! Parabéns, vocês ganharam **{this.prize}**\n{this.messageURL}',
err: 'Sem participações válidas, nenhum(s) novo(s) vencedor(es) escolhidos!'
},
help: {
diff --git a/src/Translations/zh-CN.js b/src/Translations/zh-CN.js
index 234e3445..2d74b294 100644
--- a/src/Translations/zh-CN.js
+++ b/src/Translations/zh-CN.js
@@ -191,7 +191,7 @@ module.exports = {
term: 'Ended at',
host: 'Hosted by: {user}',
win: 'winner(s)',
- wins: 'Congratulations, {winners}! You won **{prize}**!\n{messageURL}',
+ wins: 'Congratulations, {winners}! You won **{this.prize}**!\n{this.messageURL}',
addReaction: 'addReaction with 🎁 to participate!',
restante: 'Time remaining:',
no: 'Giveaway cancelled, no valid participations',
@@ -200,7 +200,7 @@ module.exports = {
start: 'You did not use the command correctly, use: `%pgiveaway [time (10s, 10m)] [winners (1, 1w)] [prize (photos of kittens)]`, do not include **[]** or **()**.',
end: 'You didn\'t use the command correctly, use: `%pgiveaway-end [message id]`',
reroll: 'You didn\'t use the command correctly, use: `%pgiveaway-reroll [message id]`',
- novo: 'New winner(s): {winners}! Congratulations, you won **{prize}**\n{messageURL}',
+ novo: 'New winner(s): {winners}! Congratulations, you won **{this.prize}**\n{this.messageURL}',
err: 'No valid participations, no new winner(s) can be chosen!'
},
help: {
diff --git a/src/Translations/zh-TW.js b/src/Translations/zh-TW.js
index 4c85ac3d..700bdc92 100644
--- a/src/Translations/zh-TW.js
+++ b/src/Translations/zh-TW.js
@@ -31,7 +31,7 @@ module.exports = {
term: 'Terminou ás',
host: 'Sorteio de: {user}',
win: 'ganhador(es)',
- wins: 'Parabéns, {winners}! Você ganhou **{prize}**!\n{messageURL}',
+ wins: 'Parabéns, {winners}! Você ganhou **{this.prize}**!\n{this.messageURL}',
addReaction: 'Reaja com 🎁 para participar!',
restante: 'Tempo Restante:',
no: 'Sorteio cancelado, sem participações válidas',
@@ -40,7 +40,7 @@ module.exports = {
start: 'Você não usou o comando corretamente, utilize: `%pgiveaway-start [tempo(10s, 10m)] [ganhadores(1, 1w)] [prêmio(fotos de gatinhos)]`, não inclua **[]** ou **()**.',
end: 'Você não usou o comando corretamente, utilize: `%pgiveaway-end [id da mensagem]`',
reroll: 'Você não usou o comando corretamente, utilize: `%pgiveaway-reroll [id da mensagem]`',
- novo: 'Novo ganhador(es): {winners}! Parabéns, vocês ganharam **{prize}**\n{messageURL}',
+ novo: 'Novo ganhador(es): {winners}! Parabéns, vocês ganharam **{this.prize}**\n{this.messageURL}',
err: 'Sem participações válidas, nenhum(s) novo(s) vencedor(es) escolhidos!'
},
help: {
diff --git a/src/Utils/ZulyFunctions.js b/src/Utils/ZulyFunctions.js
index 63bfb594..b8db2240 100644
--- a/src/Utils/ZulyFunctions.js
+++ b/src/Utils/ZulyFunctions.js
@@ -35,7 +35,7 @@ async function getWebhook (channel) {
const webhooks = await global.zuly.getChannelWebhooks(channel.id);
if (webhooks.length === 0) {
const webhook = channel.createWebhook({
- avatar: global.zuly.user.avatarURL,
+ avatar: global.zuly.user.displayAvatarURL({ dynamic: true, format: 'png', size: 4096 }),
name: global.zuly.user.username,
reason: 'Zuly | EventLog'
});
@@ -98,17 +98,17 @@ async function banner (id) {
let hexString;
let userBanner;
- if (user.bannerURL == null) {
+ if (user.banner == null) {
if (user.accentColor === null) {
userBanner = 'https://singlecolorimage.com/get/ffcbdb/600x240';
}
else {
- hexString = user.accentColor.toString(16);
+ hexString = user.accentColor ? user.accentColor.toString(16) : 'ffcbdb';
userBanner = `https://singlecolorimage.com/get/${hexString}/600x240`;
}
}
else {
- userBanner = user.bannerURL;
+ userBanner = user.bannerURL({ dynamic: true, size: 4096 });
}
// const url = user.bannerURL || `https://singlecolorimage.com/get/${hexString}/960x540`;
return userBanner;
diff --git a/src/db/giveaways.json b/src/db/giveaways.json
index 0637a088..964bb386 100644
--- a/src/db/giveaways.json
+++ b/src/db/giveaways.json
@@ -1 +1 @@
-[]
\ No newline at end of file
+[{"messageId":"953322298826448946","channelId":"880407547562061824","guildId":"880174783294214184","startAt":1647360149626,"endAt":1647446549626,"ended":false,"winnerCount":1,"prize":"test","messages":{"giveaway":"🎉🎉 **GIVEAWAY** 🎉🎉","giveawayEnded":"🎉🎉 **GIVEAWAY ENDED** 🎉🎉","inviteToParticipate":"Reaja com 🎁 para participar!","winMessage":"🎁 Parabéns, {winners}! Você ganhou **{prize}**!\n{messageURL}","drawing":"Drawing: {timestamp}","dropMessage":"Be the first to react with 🎉 !","embedFooter":"{this.winnerCount} winner(s)","noWinner":"Sorteio cancelado, sem participações válidas","winners":"ganhador(es)","endedAt":"Terminou ás","hostedBy":"Sorteio de: {user}","timeRemaining":"Tempo Restante: **{duration}**","units":{"seconds":"segundos","minutes":"minutos","hours":"horas","days":"dias"}}},{"messageId":"953323174085402626","channelId":"880407547562061824","guildId":"880174783294214184","startAt":1647360358423,"endAt":1647360368423,"ended":true,"winnerCount":1,"prize":"test","messages":{"giveaway":"🎉🎉 **GIVEAWAY** 🎉🎉","giveawayEnded":"🎉🎉 **GIVEAWAY ENDED** 🎉🎉","inviteToParticipate":"Reaja com 🎁 para participar!","winMessage":"🎁 Parabéns, {winners}! Você ganhou **{prize}**!\n{messageURL}","drawing":"Tempo Restante: **{drawing}**","dropMessage":"Be the first to react with 🎉 !","embedFooter":"{this.winnerCount} winner(s)","noWinner":"Sorteio cancelado, sem participações válidas","winners":"ganhador(es)","endedAt":"Terminou ás","hostedBy":"Sorteio de: {user}","units":{"seconds":"segundos","minutes":"minutos","hours":"horas","days":"dias"}},"winnerIds":["717766639260532826"]},{"messageId":"953323703893102653","channelId":"880407547562061824","guildId":"880174783294214184","startAt":1647360484724,"endAt":1647360514724,"ended":true,"winnerCount":1,"prize":"Olá!","messages":{"giveaway":"🎉🎉 **GIVEAWAY** 🎉🎉","giveawayEnded":"🎉🎉 **GIVEAWAY ENDED** 🎉🎉","inviteToParticipate":"Reaja com 🎁 para participar!","winMessage":"🎁 Parabéns, {winners}! Você ganhou **{this.prize}**!\n{this.messageURL}","drawing":"Tempo Restante: **{timestamp}**","dropMessage":"Be the first to react with 🎉 !","embedFooter":"{this.winnerCount} winner(s)","noWinner":"Sorteio cancelado, sem participações válidas","winners":"ganhador(es)","endedAt":"Terminou ás","hostedBy":"Sorteio de: {user}","units":{"seconds":"segundos","minutes":"minutos","hours":"horas","days":"dias"}},"winnerIds":["717766639260532826"]},{"messageId":"953414606762684437","channelId":"889930854929932288","guildId":"886680394710274169","startAt":1647382157548,"endAt":1647382187548,"ended":true,"winnerCount":1,"prize":"teste foda","messages":{"giveaway":"🎉🎉 **GIVEAWAY** 🎉🎉","giveawayEnded":"🎉🎉 **GIVEAWAY ENDED** 🎉🎉","inviteToParticipate":"Reaja com 🎁 para participar!","winMessage":"🎁 Parabéns, {winners}! Você ganhou **{this.prize}**!\n{this.messageURL}","drawing":"Tempo Restante: **{timestamp}**","dropMessage":"Be the first to react with 🎉 !","embedFooter":"{this.winnerCount} winner(s)","noWinner":"Sorteio cancelado, sem participações válidas","winners":"ganhador(es)","endedAt":"Terminou ás","hostedBy":"Sorteio de: {user}","units":{"seconds":"segundos","minutes":"minutos","hours":"horas","days":"dias"}},"winnerIds":["717766639260532826"]}]
\ No newline at end of file
diff --git a/src/zuly.js b/src/zuly.js
index 1894cbb8..e6116356 100644
--- a/src/zuly.js
+++ b/src/zuly.js
@@ -16,6 +16,10 @@ const {
top
} = require('./API/keys');
+const {
+ GiveawaysManager
+} = require('discord-giveaways');
+
const client = new Client({
restTimeOffset: 1,
defaultImageFormat: 'png',
@@ -28,9 +32,29 @@ const client = new Client({
'GUILD_VOICE_STATES',
'GUILD_MESSAGE_REACTIONS',
'DIRECT_MESSAGES'
+ ],
+ partials: [
+ 'USER',
+ 'GUILD',
+ 'CHANNEL',
+ 'MESSAGE',
+ 'REACTION'
]
});
+client.giveawaysManager = new GiveawaysManager(client, {
+ storage: './src/db/giveaways.json',
+ updateCountdownEvery: 5000,
+ default: {
+ botsCanWin: false,
+ embedColor: '#FFCBDB',
+ embedColorEnd: '#FFCBDB',
+ reaction: '🎁'
+ }
+});
+
+client.backup = require('discord-backup');
+// Collections
client.commands = new Collection();
client.events = new Collection();
client.aliases = new Collection();
diff --git a/yarn.lock b/yarn.lock
index 95b4c8ec..e6fbd4cc 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -535,7 +535,22 @@ discord-api-types@^0.26.0:
resolved "https://registry.yarnpkg.com/discord-api-types/-/discord-api-types-0.26.1.tgz#726f766ddc37d60da95740991d22cb6ef2ed787b"
integrity sha512-T5PdMQ+Y1MEECYMV5wmyi9VEYPagEDEi4S0amgsszpWY0VB9JJ/hEvM6BgLhbdnKky4gfmZEXtEEtojN8ZKJQQ==
-discord.js@^13.6.0:
+discord-backup@^3.0.1:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/discord-backup/-/discord-backup-3.0.1.tgz#4208ee7d33103f7a84e8c7cfad888e315c396bf8"
+ integrity sha512-V0KsDHJPVx+zjWPv11alWmHSQ/CO4Mnzko3afDotz6U45py37igjFOCfHCqV3Q3AT6kk7Hi4H5pgA3H7qPw2zw==
+ dependencies:
+ discord.js "^13.0.1"
+
+discord-giveaways@^5.1.1:
+ version "5.1.1"
+ resolved "https://registry.yarnpkg.com/discord-giveaways/-/discord-giveaways-5.1.1.tgz#d0cae7a9c7c6c5a315794b7715af8fdc8a0c8e9b"
+ integrity sha512-TogRQrnyDVtu+/juWwK22ykBKO1K8p7yPfXEZ67xao70bkNj+FLw0lOaBQqdomNWa3JypaE9FNXLgY0LaRyJIg==
+ dependencies:
+ deepmerge "^4.2.2"
+ serialize-javascript "^6.0.0"
+
+discord.js@^13.0.1, discord.js@^13.6.0:
version "13.6.0"
resolved "https://registry.yarnpkg.com/discord.js/-/discord.js-13.6.0.tgz#d8a8a591dbf25cbcf9c783d5ddf22c4694860475"
integrity sha512-tXNR8zgsEPxPBvGk3AQjJ9ljIIC6/LOPjzKwpwz8Y1Q2X66Vi3ZqFgRHYwnHKC0jC0F+l4LzxlhmOJsBZDNg9g==
@@ -593,15 +608,6 @@ eris-collector@^1.0.1:
dependencies:
events "^3.1.0"
-eris-giveaways@^1.0.3:
- version "1.0.3"
- resolved "https://registry.yarnpkg.com/eris-giveaways/-/eris-giveaways-1.0.3.tgz#20d185c3f10b9fcce11ea2ea75efa19b4668c507"
- integrity sha512-aRXuPyK4kj9wFZmioZpbj9g70YVMC5jAE0DXGr//ff4YS5mUZsbIWX7vLdJs1EvNfMwg3hTIm/mafSAm3kYYDw==
- dependencies:
- deepmerge "^4.2.2"
- eris "github:bsian03/eris#v9"
- serialize-javascript "^6.0.0"
-
eris@0.16.1:
version "0.16.1"
resolved "https://registry.yarnpkg.com/eris/-/eris-0.16.1.tgz#44b0a9220944fc73dd74538cd614826bfbfcde61"
@@ -612,15 +618,6 @@ eris@0.16.1:
opusscript "^0.0.8"
tweetnacl "^1.0.3"
-"eris@github:bsian03/eris#v9":
- version "0.16.0-dev"
- resolved "https://codeload.github.com/bsian03/eris/tar.gz/d65f3b337bd1b6040cfadedc28fedc13b0a58bf5"
- dependencies:
- ws "^7.4.6"
- optionalDependencies:
- opusscript "^0.0.8"
- tweetnacl "^1.0.1"
-
escape-html@~1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988"
@@ -1796,7 +1793,7 @@ tslib@^2.3.1:
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.1.tgz#e8a335add5ceae51aa261d32a490158ef042ef01"
integrity sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==
-tweetnacl@^1.0.1, tweetnacl@^1.0.3:
+tweetnacl@^1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-1.0.3.tgz#ac0af71680458d8a6378d0d0d050ab1407d35596"
integrity sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==
@@ -1941,11 +1938,6 @@ write-file-atomic@^3.0.0:
signal-exit "^3.0.2"
typedarray-to-buffer "^3.1.5"
-ws@^7.4.6:
- version "7.5.6"
- resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.6.tgz#e59fc509fb15ddfb65487ee9765c5a51dec5fe7b"
- integrity sha512-6GLgCqo2cy2A2rjCNFlxQS6ZljG/coZfZXclldI8FB/1G3CCI36Zd8xy2HrFVACi8tfk5XrgLQEk+P0Tnz9UcA==
-
ws@^8.2.3:
version "8.2.3"
resolved "https://registry.yarnpkg.com/ws/-/ws-8.2.3.tgz#63a56456db1b04367d0b721a0b80cae6d8becbba"