mirror of
https://github.com/SrIzan10/handler.git
synced 2026-05-01 10:45:17 +00:00
feat(*): Revamp Docs (#47)
* style: Formatted 17 files & changes messageHelper util * style: Formatted HTML and CSS files * Revert "style: Formatted 17 files & changes messageHelper util" This reverts commit 988d7fa6d2f07fadd05d1fc5a42c26d4767b0b44. * style(style.css): Formatted main style file with tabwidth 2 * chore: Added docs maintainer * chore: Changed typedoc configration * chore(README.md): Removed coming soon from links * chore: Updated Prettier formatter tab width * docs(readme): Improved Readme readability * docs(README): Fixed installation box * style(README.md): Improved readability * chore: Added CONTRIBUTING.md * docs(README.md): Removed old repo link and it's line * docs(README): Updated Intents to djs v14 Co-authored-by: EvolutionX <85353424+EvolutionX-10@users.noreply.github.com> * docs: Updated README example to djs v14 * docs: Formatted README examples * Update README.md * docs: Updated organization description * docs(README): Rename 'fixed' to 'patched' * chore: Updated LICENSE * chore: Updated LICNESE * chore: Changed license to MIT * Delete LICENSE.md * chore: Recreated LICENSE * chore: First License boilerplate preview * style(index.ts): Added a space * chore(index.ts): First license boilerplate preview * chore(PRETTIER): Re-updated the tab width * chore(SECURITY): Updated security.md file * docs(README): Improved readability * fix(README): Fixed typo * style: Updated license boilerplate * style(*): Updated license boilerplate * style: Updated license boilerplate * style: Updated license boilerplate * style: Updated license boilerplate * style: Updated License boilerplate * style: Updated License boilerplate * docs(README): Added stats * docs(README): Temporarily or permanently removed stats * refactor: DRY Principles * feat: finished interactionCreate.ts handling? (need test) * chore: Updated CONTRIBUTING.md file * chore: Updated credits * chore(NPM): Prepared package.json for release * revert: Some changes * revert: Revert back to MIT LICENSE (#50) * chore: Updated LICENSE boilerplate * style: Improved comments * style: Updated comments * fix: Non-exhaustiveness led to commands not registering readyEvent.ts * feat: Add DefinetlyDefined type, more todo statements * feat: Aliases optional * feat: Optional plugins to reduce bloat * feat: better looking typings for modules * refactor: Simplify sernModule handler signature * refactor: make ApplicationCommandOptions optional * refactor: make description optional * refactor: Bring CommandType and PluginType to top level * fix: Fix return type of sernModule * refactor: Why is that not assignable bruh * revert: Re-add plugins overload * fix(CODE_OF_CONDUCT): Removed unusual dot * Update package.json * fix: Resolve conflicts * fix: Resolve conflicts * feat: should be able to register other nodejs event emitters * fix: Standard for of does not resolve promises. Switched to for await * feat: Adding sern event listeners, overriding and typing methods * feat: Edited event names for more conciseness, finished basic event emitters * style: Run prettier * fix: didn't run prettier, now i am * fix: linting issue in markup.ts * fix: prettier wants lf line ending * fix: prettier changes again * feat: add .prettierignore and ignore README.md * feat: add externallyUsed.ts and support BothCommands again * feat: remove comments about prev commit * style: change prettier print width and reformat * feat: adding modal and autocomplete support * feat: Finishing up autocomplete, need to test * feat: Making name required in auto cmp interactions * feat: move name and description out of OptionsData[] * feat: finishing optionData for autocomplete changes, adding class for builder * feat: finishing autocomplete!! * refactor: Simplifying logic of message filter * feat: Adding docs to some data structures, moving to default from export files * refactor: cleaning up code, removing unuseds * feat: adding refactoring for repetitive event plugin processing * feat: adding better typings, refactoring * refactor: remove unnecessary nullish short circuit * refactor: remove unnecessary nullish short circuit * feat: add docs/ to npmignore * style: Formatted 17 files & changes messageHelper util * style: Formatted HTML and CSS files * Revert "style: Formatted 17 files & changes messageHelper util" This reverts commit 988d7fa6d2f07fadd05d1fc5a42c26d4767b0b44. * style(style.css): Formatted main style file with tabwidth 2 * chore: Added docs maintainer * chore: Changed typedoc configration * chore(README.md): Removed coming soon from links * docs(readme): Improved Readme readability * chore: Added CONTRIBUTING.md * docs(README): Fixed installation box * style(README.md): Improved readability * docs(README.md): Removed old repo link and it's line * docs: Updated README example to djs v14 * docs(README): Updated Intents to djs v14 Co-authored-by: EvolutionX <85353424+EvolutionX-10@users.noreply.github.com> * docs: Formatted README examples * Update README.md * chore: Updated LICENSE * chore: Updated LICNESE * chore: Changed license to MIT * Delete LICENSE.md * chore: Recreated LICENSE * chore: First License boilerplate preview * style(index.ts): Added a space * chore(index.ts): First license boilerplate preview * chore(SECURITY): Updated security.md file * style: Updated license boilerplate * docs(README): Added stats * chore: Updated CONTRIBUTING.md file * chore: Updated credits * chore(NPM): Prepared package.json for release * revert: Some changes * revert: Revert back to MIT LICENSE (#50) * fix(CODE_OF_CONDUCT): Removed unusual dot * fix: Resolve conflicts * fix: Resolve conflicts Co-authored-by: EvolutionX <85353424+EvolutionX-10@users.noreply.github.com> Co-authored-by: Jacob Nguyen <76754747+jacoobes@users.noreply.github.com>
This commit is contained in:
2
.github/CODEOWNERS
vendored
Normal file
2
.github/CODEOWNERS
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
src/* @jacoobes
|
||||
docs/* @Murtatrxx
|
||||
49
.github/CONTRIBUTING.md
vendored
Normal file
49
.github/CONTRIBUTING.md
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
# Contributing
|
||||
|
||||
When contributing to this repository, please first discuss the change you wish to make via issue,
|
||||
email, or any other method with the owners of this repository before making a change.
|
||||
|
||||
Please note we have a [code of conduct](https://github.com/sern-handler/handler/blob/main/CODE_OF_CONDUCT.md), please follow it in all your interactions with the project.
|
||||
|
||||
## Pull Request Process
|
||||
|
||||
1. Ensure any install or build dependencies are removed before the end of the layer when doing a
|
||||
build.
|
||||
2. Update the README.md with details of changes to the interface, this includes new environment
|
||||
variables, exposed ports, useful file locations and container parameters.
|
||||
3. Increase the version numbers in any examples files and the README.md to the new version that this
|
||||
Pull Request would represent. The versioning scheme we use is [SemVer](http://semver.org/).
|
||||
4. You may merge the Pull Request in once you have the sign-off of two other developers, or if you
|
||||
do not have permission to do that, you may request the second reviewer to merge it for you.
|
||||
|
||||
### Our Responsibilities
|
||||
|
||||
Project maintainers are responsible for clarifying the standards of acceptable
|
||||
behavior and are expected to take appropriate and fair corrective action in
|
||||
response to any instances of unacceptable behavior.
|
||||
|
||||
Project maintainers have the right and responsibility to remove, edit, or
|
||||
reject comments, commits, code, wiki edits, issues, and other contributions
|
||||
that are not aligned to this Code of Conduct, or to ban temporarily or
|
||||
permanently any contributor for other behaviors that they deem inappropriate,
|
||||
threatening, offensive, or harmful.
|
||||
### Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||
reported by contacting the project team at our [discord server](https://discord.com/invite/QgnfxWzrcj). All
|
||||
complaints will be reviewed and investigated and will result in a response that
|
||||
is deemed necessary and appropriate to the circumstances. The project team is
|
||||
obligated to maintain confidentiality with regard to the reporter of an incident.
|
||||
Further details of specific enforcement policies may be posted separately.
|
||||
|
||||
Project maintainers who do not follow or enforce the Code of Conduct in good
|
||||
faith may face temporary or permanent repercussions as determined by other
|
||||
members of the project's leadership.
|
||||
|
||||
### Attribution
|
||||
|
||||
This contributing guidelines is adapted from the [Contributor Covenant][homepage], version 1.4,
|
||||
available at [http://contributor-covenant.org/version/1/4][version]
|
||||
|
||||
[homepage]: http://contributor-covenant.org
|
||||
[version]: http://contributor-covenant.org/version/1/4/
|
||||
4
.github/SECURITY.md
vendored
4
.github/SECURITY.md
vendored
@@ -2,12 +2,14 @@
|
||||
|
||||
## Supported Versions
|
||||
|
||||
Project is currently in development and is not yet ready to be used.
|
||||
Project is currently under heavy development but you can try out our [npm package](https://npmjs.com/package/@sern/handler)
|
||||
|
||||
| Version | Supported |
|
||||
| ------- | ------------------ |
|
||||
| 0.1.0 @ dev | :white_check_mark: |
|
||||
|
||||
* Dev versions might include bugs, use it with your own risk.
|
||||
|
||||
## Reporting a Vulnerability
|
||||
|
||||
You can report a vulnerability by opening an issue on the [project's GitHub](https://github.com/SernHandler/Sern/issues) repository.
|
||||
|
||||
18
.gitignore
vendored
18
.gitignore
vendored
@@ -54,19 +54,20 @@ typings/
|
||||
# Yarn Integrity file
|
||||
.yarn-integrity
|
||||
|
||||
# dotenv environment variables file
|
||||
# Typedoc raw output
|
||||
.typedoc
|
||||
|
||||
# Dotenv environment variables file
|
||||
.env
|
||||
|
||||
# parcel-bundler cache (https://parceljs.org/)
|
||||
# Parcel-bundler cache (https://parceljs.org/)
|
||||
.cache
|
||||
|
||||
# next.js build output
|
||||
# next.js and nuxt.js build output
|
||||
.next
|
||||
|
||||
# nuxt.js build output
|
||||
.nuxt
|
||||
|
||||
# vuepress build output
|
||||
# Vuepress build output
|
||||
.vuepress/dist
|
||||
|
||||
# Serverless directories
|
||||
@@ -75,8 +76,11 @@ typings/
|
||||
# FuseBox cache
|
||||
.fusebox/
|
||||
|
||||
# TypeScript build output
|
||||
dist
|
||||
|
||||
# VisualStudio Config file
|
||||
.vs
|
||||
|
||||
.idea
|
||||
# IntelliJ IDEA Config file
|
||||
.idea/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# Code of Conduct
|
||||
All participants of SernHandler. are expected to abide by our Code of Conduct, both online and during in-person events that are hosted and/or associated with SernHandler.
|
||||
All participants of SernHandler are expected to abide by our Code of Conduct, both online and during in-person events that are hosted and/or associated with SernHandler.
|
||||
|
||||
# The Pledge
|
||||
In the interest of fostering an open and welcoming environment, we pledge to make participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
|
||||
|
||||
352
LICENSE.md
352
LICENSE.md
@@ -1,339 +1,23 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
MIT License
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
**Copyright (c) 2022 Sern**
|
||||
|
||||
Preamble
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Lesser General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
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
|
||||
this service 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.
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. 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.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute 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 and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
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
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the 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 a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, 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.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE 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.
|
||||
|
||||
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
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
A discord.js wrapper to make easier to use discord.js
|
||||
Copyright (C) 2022 SernHandler, Inc.
|
||||
|
||||
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 2 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, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision 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, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This 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.
|
||||
End license text.
|
||||
|
||||
99
README.md
99
README.md
@@ -1,96 +1,83 @@
|
||||
# Sern Handler
|
||||
# SernHandler
|
||||
|
||||
<a href="https://www.npmjs.com/package/sern-handler">
|
||||
<img src="https://img.shields.io/npm/v/sern_handler?maxAge=3600" alt="NPM version" /></a> <a href="https://www.npmjs.com/package/sern-handler"><img src="https://img.shields.io/npm/dt/sern_handler?maxAge=3600" alt="NPM downloads" /></a> <a href="https://www.npmjs.com/package/sern-handler"><img src="https://img.shields.io/badge/builds-stable" alt="Builds Passing"></a>
|
||||
<a href="https://www.npmjs.com/package/@sern/handler"><img src="https://img.shields.io/npm/v/@sern/handler?maxAge=3600" alt="NPM version" /></a>
|
||||
<a href="https://www.npmjs.com/package/@sern/handler"><img src="https://img.shields.io/npm/dt/@sern/handler?maxAge=3600" alt="NPM downloads" /></a>
|
||||
[](https://opensource.org/licenses/MIT)
|
||||
|
||||
Sern can automate and streamline development of your discord bot with new version compatibility and full customization.
|
||||
A customizable, batteries-included, powerful discord.js framework to automate and streamline your bot development.
|
||||
|
||||
- A reincarnation of [this old project](https://github.com/jacoobes/sern_handler)
|
||||
|
||||
## Installation
|
||||
|
||||
```sh
|
||||
npm install sern-handler
|
||||
npm install @sern/handler
|
||||
```
|
||||
|
||||
```sh
|
||||
yarn add sern-handler
|
||||
yarn add @sern/handler
|
||||
```
|
||||
|
||||
```sh
|
||||
pnpm add sern-handler
|
||||
pnpm add @sern/handler
|
||||
```
|
||||
|
||||
## Basic Usage
|
||||
|
||||
#### ` index.js `
|
||||
#### ` index.js (CommonJS)`
|
||||
|
||||
```js
|
||||
import { Client, Intents } from 'discord.js';
|
||||
import { Sern } from 'sern-handler';
|
||||
import { prefix, token } from '../src/secrets.json';
|
||||
const { Client, GatewayIntentBits } = require('discord.js');
|
||||
const { Sern } = require('sern-handler');
|
||||
const { defaultPrefix, token } = require('./config.json');
|
||||
|
||||
const client = new Client({
|
||||
intents: [
|
||||
Intents.FLAGS.GUILDS,
|
||||
Intents.FLAGS.GUILD_MESSAGES,
|
||||
Intents.FLAGS.GUILD_MEMBERS
|
||||
]
|
||||
intents: [
|
||||
GatewayIntentBits.Guilds,
|
||||
GatewayIntentBits.GuildMembers,
|
||||
GatewayIntentBits.GuildMessages
|
||||
]
|
||||
});
|
||||
|
||||
new Sern.Handler({
|
||||
client,
|
||||
prefix,
|
||||
commands: 'dist/commands',
|
||||
privateServers: [
|
||||
{
|
||||
test: true,
|
||||
id: 'server-id'
|
||||
}
|
||||
],
|
||||
init: async (handler) => {
|
||||
// Optional function to initialize anything else on bot startup
|
||||
},
|
||||
Sern.init({
|
||||
client,
|
||||
defaultPrefix,
|
||||
commands : 'src/commands',
|
||||
});
|
||||
|
||||
|
||||
client.login(token);
|
||||
```
|
||||
|
||||
#### ` ping.js `
|
||||
#### ` ping.js (CommonJS)`
|
||||
|
||||
```js
|
||||
import { Sern, Types } from 'sern-handler';
|
||||
import { Ok } from 'ts-results';
|
||||
const { Sern, CommandType } = require('@sern/handler');
|
||||
|
||||
export default {
|
||||
alias: [],
|
||||
desc: 'A ping pong command',
|
||||
visibility: 'private',
|
||||
test: false,
|
||||
type: Sern.CommandType.SLASH | Sern.CommandType.TEXT,
|
||||
execute: async ({ message, interaction }, args) => 'pong!'
|
||||
};
|
||||
exports.default = {
|
||||
description: 'A ping pong command',
|
||||
type: CommandType.Slash,
|
||||
execute(ctx) {
|
||||
ctx.reply('pong!');
|
||||
}
|
||||
};
|
||||
```
|
||||
|
||||
See [documentation](https://sern-handler.js.org) for TypeScript examples and more
|
||||
See our [templates](https://github.com/sern-handler/templates) for TypeScript examples and more
|
||||
|
||||
## Links 
|
||||
## CLI
|
||||
|
||||
- [Official Documentation](https://tmp.com)
|
||||
- [Example Bot](https://tmp.com)
|
||||
- [Discord Server](https://google.com)
|
||||
We are providing a [command line interface](https://github.com/sern-handler/cli) for better & easier bot developement. Don't forget to view it.
|
||||
|
||||
## Links
|
||||
|
||||
- [Official Documentation](https://sern-handler.js.org)
|
||||
- [Support Server](https://discord.com/invite/Yvb7DnqjXX)
|
||||
|
||||
## Contribute
|
||||
|
||||
- Pull up on [issues](https://github.com/sern-handler/Sern/issues) and tell us, if there are bugs
|
||||
- All kinds of contributions are welcomed!
|
||||
- Read our contribution [guidelines](https://github.com/sern-handler/handler) carefully
|
||||
- Pull up on [issues](https://github.com/sern-handler/handler/issues) and report bugs
|
||||
- All kinds of contributions are welcomed.
|
||||
|
||||
## TODO
|
||||
## Roadmap
|
||||
|
||||
- Default commands
|
||||
- Categories
|
||||
- Ruling out all bugs in the command system
|
||||
- Better support for slash commands
|
||||
- More Build scripts
|
||||
- Logger
|
||||
You can check our [roadmap](https://github.com/sern-handler/roadmap) to see what's going to be added or patched in the future.
|
||||
|
||||
@@ -1,27 +1,28 @@
|
||||
:root {
|
||||
--light-hl-0: #000000;
|
||||
--dark-hl-0: #D4D4D4;
|
||||
--light-hl-1: #AF00DB;
|
||||
--dark-hl-1: #C586C0;
|
||||
--light-hl-2: #001080;
|
||||
--dark-hl-2: #9CDCFE;
|
||||
--light-hl-3: #A31515;
|
||||
--dark-hl-3: #CE9178;
|
||||
--light-hl-4: #0000FF;
|
||||
--dark-hl-4: #569CD6;
|
||||
--light-hl-5: #0070C1;
|
||||
--dark-hl-5: #4FC1FF;
|
||||
--light-hl-6: #795E26;
|
||||
--dark-hl-6: #DCDCAA;
|
||||
--light-hl-7: #008000;
|
||||
--dark-hl-7: #6A9955;
|
||||
--light-hl-8: #CD3131;
|
||||
--dark-hl-8: #F44747;
|
||||
--light-code-background: #F5F5F5;
|
||||
--dark-code-background: #1E1E1E;
|
||||
--light-hl-0: #000000;
|
||||
--dark-hl-0: #d4d4d4;
|
||||
--light-hl-1: #af00db;
|
||||
--dark-hl-1: #c586c0;
|
||||
--light-hl-2: #001080;
|
||||
--dark-hl-2: #9cdcfe;
|
||||
--light-hl-3: #a31515;
|
||||
--dark-hl-3: #ce9178;
|
||||
--light-hl-4: #0000ff;
|
||||
--dark-hl-4: #569cd6;
|
||||
--light-hl-5: #0070c1;
|
||||
--dark-hl-5: #4fc1ff;
|
||||
--light-hl-6: #795e26;
|
||||
--dark-hl-6: #dcdcaa;
|
||||
--light-hl-7: #008000;
|
||||
--dark-hl-7: #6a9955;
|
||||
--light-hl-8: #cd3131;
|
||||
--dark-hl-8: #f44747;
|
||||
--light-code-background: #f5f5f5;
|
||||
--dark-code-background: #1e1e1e;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: light) { :root {
|
||||
@media (prefers-color-scheme: light) {
|
||||
:root {
|
||||
--hl-0: var(--light-hl-0);
|
||||
--hl-1: var(--light-hl-1);
|
||||
--hl-2: var(--light-hl-2);
|
||||
@@ -32,9 +33,11 @@
|
||||
--hl-7: var(--light-hl-7);
|
||||
--hl-8: var(--light-hl-8);
|
||||
--code-background: var(--light-code-background);
|
||||
} }
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) { :root {
|
||||
@media (prefers-color-scheme: dark) {
|
||||
:root {
|
||||
--hl-0: var(--dark-hl-0);
|
||||
--hl-1: var(--dark-hl-1);
|
||||
--hl-2: var(--dark-hl-2);
|
||||
@@ -45,41 +48,63 @@
|
||||
--hl-7: var(--dark-hl-7);
|
||||
--hl-8: var(--dark-hl-8);
|
||||
--code-background: var(--dark-code-background);
|
||||
} }
|
||||
}
|
||||
}
|
||||
|
||||
body.light {
|
||||
--hl-0: var(--light-hl-0);
|
||||
--hl-1: var(--light-hl-1);
|
||||
--hl-2: var(--light-hl-2);
|
||||
--hl-3: var(--light-hl-3);
|
||||
--hl-4: var(--light-hl-4);
|
||||
--hl-5: var(--light-hl-5);
|
||||
--hl-6: var(--light-hl-6);
|
||||
--hl-7: var(--light-hl-7);
|
||||
--hl-8: var(--light-hl-8);
|
||||
--code-background: var(--light-code-background);
|
||||
--hl-0: var(--light-hl-0);
|
||||
--hl-1: var(--light-hl-1);
|
||||
--hl-2: var(--light-hl-2);
|
||||
--hl-3: var(--light-hl-3);
|
||||
--hl-4: var(--light-hl-4);
|
||||
--hl-5: var(--light-hl-5);
|
||||
--hl-6: var(--light-hl-6);
|
||||
--hl-7: var(--light-hl-7);
|
||||
--hl-8: var(--light-hl-8);
|
||||
--code-background: var(--light-code-background);
|
||||
}
|
||||
|
||||
body.dark {
|
||||
--hl-0: var(--dark-hl-0);
|
||||
--hl-1: var(--dark-hl-1);
|
||||
--hl-2: var(--dark-hl-2);
|
||||
--hl-3: var(--dark-hl-3);
|
||||
--hl-4: var(--dark-hl-4);
|
||||
--hl-5: var(--dark-hl-5);
|
||||
--hl-6: var(--dark-hl-6);
|
||||
--hl-7: var(--dark-hl-7);
|
||||
--hl-8: var(--dark-hl-8);
|
||||
--code-background: var(--dark-code-background);
|
||||
--hl-0: var(--dark-hl-0);
|
||||
--hl-1: var(--dark-hl-1);
|
||||
--hl-2: var(--dark-hl-2);
|
||||
--hl-3: var(--dark-hl-3);
|
||||
--hl-4: var(--dark-hl-4);
|
||||
--hl-5: var(--dark-hl-5);
|
||||
--hl-6: var(--dark-hl-6);
|
||||
--hl-7: var(--dark-hl-7);
|
||||
--hl-8: var(--dark-hl-8);
|
||||
--code-background: var(--dark-code-background);
|
||||
}
|
||||
|
||||
.hl-0 { color: var(--hl-0); }
|
||||
.hl-1 { color: var(--hl-1); }
|
||||
.hl-2 { color: var(--hl-2); }
|
||||
.hl-3 { color: var(--hl-3); }
|
||||
.hl-4 { color: var(--hl-4); }
|
||||
.hl-5 { color: var(--hl-5); }
|
||||
.hl-6 { color: var(--hl-6); }
|
||||
.hl-7 { color: var(--hl-7); }
|
||||
.hl-8 { color: var(--hl-8); }
|
||||
pre, code { background: var(--code-background); }
|
||||
.hl-0 {
|
||||
color: var(--hl-0);
|
||||
}
|
||||
.hl-1 {
|
||||
color: var(--hl-1);
|
||||
}
|
||||
.hl-2 {
|
||||
color: var(--hl-2);
|
||||
}
|
||||
.hl-3 {
|
||||
color: var(--hl-3);
|
||||
}
|
||||
.hl-4 {
|
||||
color: var(--hl-4);
|
||||
}
|
||||
.hl-5 {
|
||||
color: var(--hl-5);
|
||||
}
|
||||
.hl-6 {
|
||||
color: var(--hl-6);
|
||||
}
|
||||
.hl-7 {
|
||||
color: var(--hl-7);
|
||||
}
|
||||
.hl-8 {
|
||||
color: var(--hl-8);
|
||||
}
|
||||
pre,
|
||||
code {
|
||||
background: var(--code-background);
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
200
docs/index.html
200
docs/index.html
@@ -1,56 +1,168 @@
|
||||
<!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>sern-handler</title><meta name="description" content="Documentation for sern-handler"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="assets/style.css"/><link rel="stylesheet" href="assets/highlight.css"/><script async src="assets/search.js" id="search-script"></script></head><body><script>document.body.classList.add(localStorage.getItem("tsd-theme") || "os")</script><header><div class="tsd-page-toolbar"><div class="container"><div class="table-wrap"><div class="table-cell" id="tsd-search" data-base="."><div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption">Search</label><input type="text" id="tsd-search-field"/></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="index.html" class="title">sern-handler</a></div><div class="table-cell" id="tsd-widgets"><div id="tsd-filter"><a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a><div class="tsd-filter-group"><div class="tsd-select" id="tsd-filter-visibility"><span class="tsd-select-label">All</span><ul class="tsd-select-list"><li data-value="public">Public</li><li data-value="protected">Public/Protected</li><li data-value="private" class="selected">All</li></ul></div> <input type="checkbox" id="tsd-filter-inherited" checked/><label class="tsd-widget" for="tsd-filter-inherited">Inherited</label><input type="checkbox" id="tsd-filter-externals" checked/><label class="tsd-widget" for="tsd-filter-externals">Externals</label></div></div><a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a></div></div></div></div><div class="tsd-page-title"><div class="container"><h1>sern-handler</h1></div></div></header><div class="container container-main"><div class="row"><div class="col-8 col-content"><div class="tsd-panel tsd-typography">
|
||||
<a href="#sern-handler" id="sern-handler" style="color: inherit; text-decoration: none;">
|
||||
<h1>Sern Handler</h1>
|
||||
</a>
|
||||
<a href="https://www.npmjs.com/package/sern-handler">
|
||||
<img src="https://img.shields.io/npm/v/sern_handler?maxAge=3600" alt="NPM version" /></a> <a href="https://www.npmjs.com/package/sern-handler"><img src="https://img.shields.io/npm/dt/sern_handler?maxAge=3600" alt="NPM downloads" /></a> <a href="https://www.npmjs.com/package/sern-handler"><img src="https://img.shields.io/badge/builds-stable" alt="Builds Passing"></a>
|
||||
<!DOCTYPE html>
|
||||
<html class="default">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="x-ua-compatible" content="IE=edge" />
|
||||
<title>SernHandler</title>
|
||||
<meta name="description" content="Documentation for sern-handler" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<link rel="stylesheet" href="assets/style.css" />
|
||||
<link rel="stylesheet" href="assets/highlight.css" />
|
||||
<script async src="assets/search.js" id="search-script"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
document.body.classList.add(localStorage.getItem('tsd-theme') || 'os');
|
||||
</script>
|
||||
<header>
|
||||
<div class="tsd-page-toolbar">
|
||||
<div class="container">
|
||||
<div class="table-wrap">
|
||||
<div class="table-cell" id="tsd-search" data-base=".">
|
||||
<div class="field">
|
||||
<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label
|
||||
><input type="text" id="tsd-search-field" />
|
||||
</div>
|
||||
<ul class="results">
|
||||
<li class="state loading">Preparing search index...</li>
|
||||
<li class="state failure">The search index is not available</li>
|
||||
</ul>
|
||||
<a href="index.html" class="title">sern-handler</a>
|
||||
</div>
|
||||
<div class="table-cell" id="tsd-widgets">
|
||||
<div id="tsd-filter">
|
||||
<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
|
||||
<div class="tsd-filter-group">
|
||||
<div class="tsd-select" id="tsd-filter-visibility">
|
||||
<span class="tsd-select-label">All</span>
|
||||
<ul class="tsd-select-list">
|
||||
<li data-value="public">Public</li>
|
||||
<li data-value="protected">Public/Protected</li>
|
||||
<li data-value="private" class="selected">All</li>
|
||||
</ul>
|
||||
</div>
|
||||
<input type="checkbox" id="tsd-filter-inherited" checked /><label
|
||||
class="tsd-widget"
|
||||
for="tsd-filter-inherited"
|
||||
>Inherited</label
|
||||
><input type="checkbox" id="tsd-filter-externals" checked /><label
|
||||
class="tsd-widget"
|
||||
for="tsd-filter-externals"
|
||||
>Externals</label
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tsd-page-title">
|
||||
<div class="container"><h1>sern-handler</h1></div>
|
||||
</div>
|
||||
</header>
|
||||
<div class="container container-main">
|
||||
<div class="row">
|
||||
<div class="col-8 col-content">
|
||||
<div class="tsd-panel tsd-typography">
|
||||
<a href="#sern-handler" id="sern-handler" style="color: inherit; text-decoration: none">
|
||||
<h1>Sern Handler</h1>
|
||||
</a>
|
||||
<a href="https://www.npmjs.com/package/sern-handler">
|
||||
<img src="https://img.shields.io/npm/v/sern_handler?maxAge=3600" alt="NPM version"
|
||||
/></a>
|
||||
<a href="https://www.npmjs.com/package/sern-handler"
|
||||
><img src="https://img.shields.io/npm/dt/sern_handler?maxAge=3600" alt="NPM downloads"
|
||||
/></a>
|
||||
<a href="https://www.npmjs.com/package/sern-handler"
|
||||
><img src="https://img.shields.io/badge/builds-stable" alt="Builds Passing"
|
||||
/></a>
|
||||
|
||||
<p>Sern can automate and streamline development of your discord bot with new version compatibility and full customization.</p>
|
||||
<ul>
|
||||
<li>A reincarnation of <a href="https://github.com/jacoobes/sern_handler">this old project</a></li>
|
||||
</ul>
|
||||
<p>
|
||||
Sern can automate and streamline development of your discord bot with new version compatibility and full
|
||||
customization.
|
||||
</p>
|
||||
<ul>
|
||||
<li>A reincarnation of <a href="https://github.com/jacoobes/sern_handler">this old project</a></li>
|
||||
</ul>
|
||||
|
||||
<a href="#installation" id="installation" style="color: inherit; text-decoration: none;">
|
||||
<h2>Installation</h2>
|
||||
</a>
|
||||
<pre><code class="language-sh"><span class="hl-0">npm install sern-handler</span>
|
||||
<a href="#installation" id="installation" style="color: inherit; text-decoration: none">
|
||||
<h2>Installation</h2>
|
||||
</a>
|
||||
<pre><code class="language-sh"><span class="hl-0">npm install sern-handler</span>
|
||||
</code></pre>
|
||||
<pre><code class="language-sh"><span class="hl-0">yarn add sern-handler</span>
|
||||
<pre><code class="language-sh"><span class="hl-0">yarn add sern-handler</span>
|
||||
</code></pre>
|
||||
<pre><code class="language-sh"><span class="hl-0">pnpm add sern-handler</span>
|
||||
<pre><code class="language-sh"><span class="hl-0">pnpm add sern-handler</span>
|
||||
</code></pre>
|
||||
|
||||
<a href="#basic-usage" id="basic-usage" style="color: inherit; text-decoration: none;">
|
||||
<h2>Basic Usage</h2>
|
||||
</a>
|
||||
<a href="#basic-usage" id="basic-usage" style="color: inherit; text-decoration: none">
|
||||
<h2>Basic Usage</h2>
|
||||
</a>
|
||||
|
||||
<a href="#indexjs" id="indexjs" style="color: inherit; text-decoration: none;">
|
||||
<h4><code>index.js</code></h4>
|
||||
</a>
|
||||
<pre><code class="language-js"><span class="hl-1">import</span><span class="hl-0"> { </span><span class="hl-2">Client</span><span class="hl-0">, </span><span class="hl-2">Intents</span><span class="hl-0"> } </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-3">'discord.js'</span><span class="hl-0">;</span><br/><span class="hl-1">import</span><span class="hl-0"> { </span><span class="hl-2">Sern</span><span class="hl-0"> } </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-3">'sern-handler'</span><span class="hl-0">;</span><br/><span class="hl-1">import</span><span class="hl-0"> { </span><span class="hl-2">prefix</span><span class="hl-0">, </span><span class="hl-2">token</span><span class="hl-0"> } </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-3">'../src/secrets.json'</span><span class="hl-0">;</span><br/><br/><span class="hl-4">const</span><span class="hl-0"> </span><span class="hl-5">client</span><span class="hl-0"> = </span><span class="hl-4">new</span><span class="hl-0"> </span><span class="hl-6">Client</span><span class="hl-0">({</span><br/><span class="hl-0"> </span><span class="hl-2">intents:</span><span class="hl-0"> [</span><br/><span class="hl-0"> </span><span class="hl-2">Intents</span><span class="hl-0">.</span><span class="hl-5">FLAGS</span><span class="hl-0">.</span><span class="hl-5">GUILDS</span><span class="hl-0">,</span><br/><span class="hl-0"> </span><span class="hl-2">Intents</span><span class="hl-0">.</span><span class="hl-5">FLAGS</span><span class="hl-0">.</span><span class="hl-5">GUILD_MESSAGES</span><span class="hl-0">,</span><br/><span class="hl-0"> </span><span class="hl-2">Intents</span><span class="hl-0">.</span><span class="hl-5">FLAGS</span><span class="hl-0">.</span><span class="hl-5">GUILD_MEMBERS</span><br/><span class="hl-0"> ]</span><br/><span class="hl-0">});</span><br/><br/><span class="hl-4">new</span><span class="hl-0"> </span><span class="hl-2">Sern</span><span class="hl-0">.</span><span class="hl-6">Handler</span><span class="hl-0">({</span><br/><span class="hl-0"> </span><span class="hl-2">client</span><span class="hl-0">, </span><br/><span class="hl-0"> </span><span class="hl-2">prefix</span><span class="hl-0">, </span><br/><span class="hl-0"> </span><span class="hl-2">commands :</span><span class="hl-0"> </span><span class="hl-3">'dist/commands'</span><span class="hl-0">, </span><br/><span class="hl-0"> </span><span class="hl-2">privateServers :</span><span class="hl-0"> [ </span><br/><span class="hl-0"> {</span><br/><span class="hl-0"> </span><span class="hl-2">test :</span><span class="hl-0"> </span><span class="hl-4">true</span><span class="hl-0">,</span><br/><span class="hl-0"> </span><span class="hl-2">id:</span><span class="hl-0"> </span><span class="hl-3">'server-id'</span><br/><span class="hl-0"> }</span><br/><span class="hl-0"> ],</span><br/><span class="hl-0"> </span><span class="hl-6">init</span><span class="hl-2">:</span><span class="hl-0"> </span><span class="hl-4">async</span><span class="hl-0"> (</span><span class="hl-2">handler</span><span class="hl-0">) </span><span class="hl-4">=></span><span class="hl-0"> {</span><br/><span class="hl-0"> </span><span class="hl-7">// Optional function to initialize anything else on bot startup</span><br/><span class="hl-0"> },</span><br/><span class="hl-0">});</span><br/><br/><br/><span class="hl-2">client</span><span class="hl-0">.</span><span class="hl-6">login</span><span class="hl-0">(</span><span class="hl-2">token</span><span class="hl-0">);</span>
|
||||
<a href="#indexjs" id="indexjs" style="color: inherit; text-decoration: none">
|
||||
<h4><code>index.js</code></h4>
|
||||
</a>
|
||||
<pre><code class="language-js"><span class="hl-1">import</span><span class="hl-0"> { </span><span class="hl-2">Client</span><span class="hl-0">, </span><span class="hl-2">Intents</span><span class="hl-0"> } </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-3">'discord.js'</span><span class="hl-0">;</span><br/><span class="hl-1">import</span><span class="hl-0"> { </span><span class="hl-2">Sern</span><span class="hl-0"> } </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-3">'sern-handler'</span><span class="hl-0">;</span><br/><span class="hl-1">import</span><span class="hl-0"> { </span><span class="hl-2">prefix</span><span class="hl-0">, </span><span class="hl-2">token</span><span class="hl-0"> } </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-3">'../src/secrets.json'</span><span class="hl-0">;</span><br/><br/><span class="hl-4">const</span><span class="hl-0"> </span><span class="hl-5">client</span><span class="hl-0"> = </span><span class="hl-4">new</span><span class="hl-0"> </span><span class="hl-6">Client</span><span class="hl-0">({</span><br/><span class="hl-0"> </span><span class="hl-2">intents:</span><span class="hl-0"> [</span><br/><span class="hl-0"> </span><span class="hl-2">Intents</span><span class="hl-0">.</span><span class="hl-5">FLAGS</span><span class="hl-0">.</span><span class="hl-5">GUILDS</span><span class="hl-0">,</span><br/><span class="hl-0"> </span><span class="hl-2">Intents</span><span class="hl-0">.</span><span class="hl-5">FLAGS</span><span class="hl-0">.</span><span class="hl-5">GUILD_MESSAGES</span><span class="hl-0">,</span><br/><span class="hl-0"> </span><span class="hl-2">Intents</span><span class="hl-0">.</span><span class="hl-5">FLAGS</span><span class="hl-0">.</span><span class="hl-5">GUILD_MEMBERS</span><br/><span class="hl-0"> ]</span><br/><span class="hl-0">});</span><br/><br/><span class="hl-4">new</span><span class="hl-0"> </span><span class="hl-2">Sern</span><span class="hl-0">.</span><span class="hl-6">Handler</span><span class="hl-0">({</span><br/><span class="hl-0"> </span><span class="hl-2">client</span><span class="hl-0">, </span><br/><span class="hl-0"> </span><span class="hl-2">prefix</span><span class="hl-0">, </span><br/><span class="hl-0"> </span><span class="hl-2">commands :</span><span class="hl-0"> </span><span class="hl-3">'dist/commands'</span><span class="hl-0">, </span><br/><span class="hl-0"> </span><span class="hl-2">privateServers :</span><span class="hl-0"> [ </span><br/><span class="hl-0"> {</span><br/><span class="hl-0"> </span><span class="hl-2">test :</span><span class="hl-0"> </span><span class="hl-4">true</span><span class="hl-0">,</span><br/><span class="hl-0"> </span><span class="hl-2">id:</span><span class="hl-0"> </span><span class="hl-3">'server-id'</span><br/><span class="hl-0"> }</span><br/><span class="hl-0"> ],</span><br/><span class="hl-0"> </span><span class="hl-6">init</span><span class="hl-2">:</span><span class="hl-0"> </span><span class="hl-4">async</span><span class="hl-0"> (</span><span class="hl-2">handler</span><span class="hl-0">) </span><span class="hl-4">=></span><span class="hl-0"> {</span><br/><span class="hl-0"> </span><span class="hl-7">// Optional function to initialize anything else on bot startup</span><br/><span class="hl-0"> },</span><br/><span class="hl-0">});</span><br/><br/><br/><span class="hl-2">client</span><span class="hl-0">.</span><span class="hl-6">login</span><span class="hl-0">(</span><span class="hl-2">token</span><span class="hl-0">);</span>
|
||||
</code></pre>
|
||||
|
||||
<a href="#pingjs" id="pingjs" style="color: inherit; text-decoration: none;">
|
||||
<h4><code>ping.js</code></h4>
|
||||
</a>
|
||||
<pre><code class="language-js"><span class="hl-1">import</span><span class="hl-0"> { </span><span class="hl-2">Sern</span><span class="hl-0">, </span><span class="hl-2">Types</span><span class="hl-0"> } </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-3">'sern-handler'</span><span class="hl-0">;</span><br/><span class="hl-1">import</span><span class="hl-0"> { </span><span class="hl-2">Ok</span><span class="hl-0"> } </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-3">'ts-results'</span><span class="hl-0">;</span><br/><br/><span class="hl-1">export</span><span class="hl-0"> </span><span class="hl-1">default</span><span class="hl-0"> {</span><br/><span class="hl-0"> </span><span class="hl-2">alias:</span><span class="hl-0"> [],</span><br/><span class="hl-0"> </span><span class="hl-2">desc :</span><span class="hl-0"> </span><span class="hl-3">'A ping pong command'</span><span class="hl-0">,</span><br/><span class="hl-0"> </span><span class="hl-2">visibility :</span><span class="hl-0"> </span><span class="hl-3">'private'</span><span class="hl-0">,</span><br/><span class="hl-0"> </span><span class="hl-2">test :</span><span class="hl-0"> </span><span class="hl-4">false</span><span class="hl-0">,</span><br/><span class="hl-0"> </span><span class="hl-2">type:</span><span class="hl-0"> </span><span class="hl-2">Sern</span><span class="hl-0">.</span><span class="hl-2">CommandType</span><span class="hl-0">.</span><span class="hl-5">SLASH</span><span class="hl-0"> | </span><span class="hl-2">Sern</span><span class="hl-0">.</span><span class="hl-2">CommandType</span><span class="hl-0">.</span><span class="hl-5">TEXT</span><span class="hl-0">,</span><br/><span class="hl-0"> </span><span class="hl-6">execute</span><span class="hl-2"> :</span><span class="hl-0"> </span><span class="hl-4">async</span><span class="hl-0"> ({ </span><span class="hl-2">message</span><span class="hl-0">, </span><span class="hl-2">interaction</span><span class="hl-0"> }, </span><span class="hl-2">args</span><span class="hl-0">) </span><span class="hl-4">=></span><span class="hl-0"> {</span><br/><span class="hl-0"> </span><span class="hl-2">interaction</span><span class="hl-0">.</span><span class="hl-6">reply</span><span class="hl-0">({ </span><span class="hl-2">content:</span><span class="hl-0"> </span><span class="hl-3">'Pong! })</span><span class="hl-8">;</span><br/><span class="hl-0"> }</span><br/><span class="hl-0">};</span>
|
||||
<a href="#pingjs" id="pingjs" style="color: inherit; text-decoration: none">
|
||||
<h4><code>ping.js</code></h4>
|
||||
</a>
|
||||
<pre><code class="language-js"><span class="hl-1">import</span><span class="hl-0"> { </span><span class="hl-2">Sern</span><span class="hl-0">, </span><span class="hl-2">Types</span><span class="hl-0"> } </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-3">'sern-handler'</span><span class="hl-0">;</span><br/><span class="hl-1">import</span><span class="hl-0"> { </span><span class="hl-2">Ok</span><span class="hl-0"> } </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-3">'ts-results'</span><span class="hl-0">;</span><br/><br/><span class="hl-1">export</span><span class="hl-0"> </span><span class="hl-1">default</span><span class="hl-0"> {</span><br/><span class="hl-0"> </span><span class="hl-2">alias:</span><span class="hl-0"> [],</span><br/><span class="hl-0"> </span><span class="hl-2">desc :</span><span class="hl-0"> </span><span class="hl-3">'A ping pong command'</span><span class="hl-0">,</span><br/><span class="hl-0"> </span><span class="hl-2">visibility :</span><span class="hl-0"> </span><span class="hl-3">'private'</span><span class="hl-0">,</span><br/><span class="hl-0"> </span><span class="hl-2">test :</span><span class="hl-0"> </span><span class="hl-4">false</span><span class="hl-0">,</span><br/><span class="hl-0"> </span><span class="hl-2">type:</span><span class="hl-0"> </span><span class="hl-2">Sern</span><span class="hl-0">.</span><span class="hl-2">CommandType</span><span class="hl-0">.</span><span class="hl-5">SLASH</span><span class="hl-0"> | </span><span class="hl-2">Sern</span><span class="hl-0">.</span><span class="hl-2">CommandType</span><span class="hl-0">.</span><span class="hl-5">TEXT</span><span class="hl-0">,</span><br/><span class="hl-0"> </span><span class="hl-6">execute</span><span class="hl-2"> :</span><span class="hl-0"> </span><span class="hl-4">async</span><span class="hl-0"> ({ </span><span class="hl-2">message</span><span class="hl-0">, </span><span class="hl-2">interaction</span><span class="hl-0"> }, </span><span class="hl-2">args</span><span class="hl-0">) </span><span class="hl-4">=></span><span class="hl-0"> {</span><br/><span class="hl-0"> </span><span class="hl-2">interaction</span><span class="hl-0">.</span><span class="hl-6">reply</span><span class="hl-0">({ </span><span class="hl-2">content:</span><span class="hl-0"> </span><span class="hl-3">'Pong! })</span><span class="hl-8">;</span><br/><span class="hl-0"> }</span><br/><span class="hl-0">};</span>
|
||||
</code></pre>
|
||||
<p>See <a href="https://sernhandler.js.org">documentation</a> for TypeScript examples and more</p>
|
||||
<p>See <a href="https://sernhandler.js.org">documentation</a> for TypeScript examples and more</p>
|
||||
|
||||
<a href="#links-" id="links-" style="color: inherit; text-decoration: none;">
|
||||
<h2>Links <img src="https://img.shields.io/badge/Coming-Soon-purple" alt="link"></h2>
|
||||
</a>
|
||||
<ul>
|
||||
<li><a href="https://tmp.com">Official Documentation</a></li>
|
||||
<li><a href="https://tmp.com">Example Bot</a></li>
|
||||
<li><a href="https://google.com">Discord Server</a></li>
|
||||
</ul>
|
||||
<a href="#links-" id="links-" style="color: inherit; text-decoration: none">
|
||||
<h2>Links <img src="https://img.shields.io/badge/Coming-Soon-purple" alt="link" /></h2>
|
||||
</a>
|
||||
<ul>
|
||||
<li><a href="https://tmp.com">Official Documentation</a></li>
|
||||
<li><a href="https://tmp.com">Example Bot</a></li>
|
||||
<li><a href="https://google.com">Discord Server</a></li>
|
||||
</ul>
|
||||
|
||||
<a href="#contribute" id="contribute" style="color: inherit; text-decoration: none;">
|
||||
<h2>Contribute</h2>
|
||||
</a>
|
||||
<ul>
|
||||
<li>Pull up on <a href="https://github.com/jacoobes/Sern/issues">issues</a> and tell me if there are bugs</li>
|
||||
<li>All kinds of contributions are welcomed!</li>
|
||||
</ul>
|
||||
</div></div><div class="col-4 col-menu menu-sticky-wrap menu-highlight"><nav class="tsd-navigation primary"><ul><li class="current"><a href="modules.html">Exports</a></li><li class=" tsd-kind-namespace"><a href="modules/Sern.html">Sern</a></li><li class=" tsd-kind-namespace"><a href="modules/Types.html">Types</a></li><li class=" tsd-kind-namespace"><a href="modules/Utils.html">Utils</a></li></ul></nav><nav class="tsd-navigation secondary menu-sticky"><ul></ul></nav></div></div></div><footer class="with-border-bottom"><div class="container"><h2>Settings</h2><p>Theme <select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></p></div></footer><div class="container tsd-generator"><p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div><div class="overlay"></div><script src="assets/main.js"></script></body></html>
|
||||
<a href="#contribute" id="contribute" style="color: inherit; text-decoration: none">
|
||||
<h2>Contribute</h2>
|
||||
</a>
|
||||
<ul>
|
||||
<li>
|
||||
Pull up on <a href="https://github.com/jacoobes/Sern/issues">issues</a> and tell me if there are bugs
|
||||
</li>
|
||||
<li>All kinds of contributions are welcomed!</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
|
||||
<nav class="tsd-navigation primary">
|
||||
<ul>
|
||||
<li class="current"><a href="modules.html">Exports</a></li>
|
||||
<li class="tsd-kind-namespace"><a href="modules/Sern.html">Sern</a></li>
|
||||
<li class="tsd-kind-namespace"><a href="modules/Types.html">Types</a></li>
|
||||
<li class="tsd-kind-namespace"><a href="modules/Utils.html">Utils</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
<nav class="tsd-navigation secondary menu-sticky"><ul></ul></nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<footer class="with-border-bottom">
|
||||
<div class="container">
|
||||
<h2>Settings</h2>
|
||||
<p>
|
||||
Theme
|
||||
<select id="theme">
|
||||
<option value="os">OS</option>
|
||||
<option value="light">Light</option>
|
||||
<option value="dark">Dark</option>
|
||||
</select>
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
<div class="container tsd-generator">
|
||||
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p>
|
||||
</div>
|
||||
<div class="overlay"></div>
|
||||
<script src="assets/main.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1,115 @@
|
||||
<!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>sern-handler</title><meta name="description" content="Documentation for sern-handler"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="assets/style.css"/><link rel="stylesheet" href="assets/highlight.css"/><script async src="assets/search.js" id="search-script"></script></head><body><script>document.body.classList.add(localStorage.getItem("tsd-theme") || "os")</script><header><div class="tsd-page-toolbar"><div class="container"><div class="table-wrap"><div class="table-cell" id="tsd-search" data-base="."><div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption">Search</label><input type="text" id="tsd-search-field"/></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="index.html" class="title">sern-handler</a></div><div class="table-cell" id="tsd-widgets"><div id="tsd-filter"><a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a><div class="tsd-filter-group"><div class="tsd-select" id="tsd-filter-visibility"><span class="tsd-select-label">All</span><ul class="tsd-select-list"><li data-value="public">Public</li><li data-value="protected">Public/Protected</li><li data-value="private" class="selected">All</li></ul></div> <input type="checkbox" id="tsd-filter-inherited" checked/><label class="tsd-widget" for="tsd-filter-inherited">Inherited</label><input type="checkbox" id="tsd-filter-externals" checked/><label class="tsd-widget" for="tsd-filter-externals">Externals</label></div></div><a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a></div></div></div></div><div class="tsd-page-title"><div class="container"><h1>sern-handler</h1></div></div></header><div class="container container-main"><div class="row"><div class="col-8 col-content"><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Namespaces</h3><ul class="tsd-index-list"><li class="tsd-kind-namespace"><a href="modules/Sern.html" class="tsd-kind-icon">Sern</a></li><li class="tsd-kind-namespace"><a href="modules/Types.html" class="tsd-kind-icon">Types</a></li><li class="tsd-kind-namespace"><a href="modules/Utils.html" class="tsd-kind-icon">Utils</a></li></ul></section></div></section></section></div><div class="col-4 col-menu menu-sticky-wrap menu-highlight"><nav class="tsd-navigation primary"><ul><li class="current"><a href="modules.html">Exports</a></li><li class=" tsd-kind-namespace"><a href="modules/Sern.html">Sern</a></li><li class=" tsd-kind-namespace"><a href="modules/Types.html">Types</a></li><li class=" tsd-kind-namespace"><a href="modules/Utils.html">Utils</a></li></ul></nav><nav class="tsd-navigation secondary menu-sticky"><ul></ul></nav></div></div></div><footer class="with-border-bottom"><div class="container"><h2>Settings</h2><p>Theme <select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></p></div></footer><div class="container tsd-generator"><p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div><div class="overlay"></div><script src="assets/main.js"></script></body></html>
|
||||
<!DOCTYPE html>
|
||||
<html class="default">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="x-ua-compatible" content="IE=edge" />
|
||||
<title>SernHandler</title>
|
||||
<meta name="description" content="Documentation for sern-handler" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<link rel="stylesheet" href="assets/style.css" />
|
||||
<link rel="stylesheet" href="assets/highlight.css" />
|
||||
<script async src="assets/search.js" id="search-script"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
document.body.classList.add(localStorage.getItem('tsd-theme') || 'os');
|
||||
</script>
|
||||
<header>
|
||||
<div class="tsd-page-toolbar">
|
||||
<div class="container">
|
||||
<div class="table-wrap">
|
||||
<div class="table-cell" id="tsd-search" data-base=".">
|
||||
<div class="field">
|
||||
<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label
|
||||
><input type="text" id="tsd-search-field" />
|
||||
</div>
|
||||
<ul class="results">
|
||||
<li class="state loading">Preparing search index...</li>
|
||||
<li class="state failure">The search index is not available</li>
|
||||
</ul>
|
||||
<a href="index.html" class="title">SernHandler - Develop faster. Grow more.</a>
|
||||
</div>
|
||||
<div class="table-cell" id="tsd-widgets">
|
||||
<div id="tsd-filter">
|
||||
<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
|
||||
<div class="tsd-filter-group">
|
||||
<div class="tsd-select" id="tsd-filter-visibility">
|
||||
<span class="tsd-select-label">All</span>
|
||||
<ul class="tsd-select-list">
|
||||
<li data-value="public">Public</li>
|
||||
<li data-value="protected">Public/Protected</li>
|
||||
<li data-value="private" class="selected">All</li>
|
||||
</ul>
|
||||
</div>
|
||||
<input type="checkbox" id="tsd-filter-inherited" checked /><label
|
||||
class="tsd-widget"
|
||||
for="tsd-filter-inherited"
|
||||
>Inherited</label
|
||||
><input type="checkbox" id="tsd-filter-externals" checked /><label
|
||||
class="tsd-widget"
|
||||
for="tsd-filter-externals"
|
||||
>Externals</label
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tsd-page-title">
|
||||
<div class="container"><h1>sern-handler</h1></div>
|
||||
</div>
|
||||
</header>
|
||||
<div class="container container-main">
|
||||
<div class="row">
|
||||
<div class="col-8 col-content">
|
||||
<section class="tsd-panel-group tsd-index-group">
|
||||
<h2>Index</h2>
|
||||
<section class="tsd-panel tsd-index-panel">
|
||||
<div class="tsd-index-content">
|
||||
<section class="tsd-index-section">
|
||||
<h3>Namespaces</h3>
|
||||
<ul class="tsd-index-list">
|
||||
<li class="tsd-kind-namespace"><a href="modules/Sern.html" class="tsd-kind-icon">Sern</a></li>
|
||||
<li class="tsd-kind-namespace"><a href="modules/Types.html" class="tsd-kind-icon">Types</a></li>
|
||||
<li class="tsd-kind-namespace"><a href="modules/Utils.html" class="tsd-kind-icon">Utils</a></li>
|
||||
</ul>
|
||||
</section>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
</div>
|
||||
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
|
||||
<nav class="tsd-navigation primary">
|
||||
<ul>
|
||||
<li class="current"><a href="modules.html">Exports</a></li>
|
||||
<li class="tsd-kind-namespace"><a href="modules/Sern.html">Sern</a></li>
|
||||
<li class="tsd-kind-namespace"><a href="modules/Types.html">Types</a></li>
|
||||
<li class="tsd-kind-namespace"><a href="modules/Utils.html">Utils</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
<nav class="tsd-navigation secondary menu-sticky"><ul></ul></nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<footer class="with-border-bottom">
|
||||
<div class="container">
|
||||
<h2>Settings</h2>
|
||||
<p>
|
||||
Theme
|
||||
<select id="theme">
|
||||
<option value="os">OS</option>
|
||||
<option value="light">Light</option>
|
||||
<option value="dark">Dark</option>
|
||||
</select>
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
<div class="container tsd-generator">
|
||||
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p>
|
||||
</div>
|
||||
<div class="overlay"></div>
|
||||
<script src="assets/main.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1 +1,155 @@
|
||||
<!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Sern | sern-handler</title><meta name="description" content="Documentation for sern-handler"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.body.classList.add(localStorage.getItem("tsd-theme") || "os")</script><header><div class="tsd-page-toolbar"><div class="container"><div class="table-wrap"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption">Search</label><input type="text" id="tsd-search-field"/></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">sern-handler</a></div><div class="table-cell" id="tsd-widgets"><div id="tsd-filter"><a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a><div class="tsd-filter-group"><div class="tsd-select" id="tsd-filter-visibility"><span class="tsd-select-label">All</span><ul class="tsd-select-list"><li data-value="public">Public</li><li data-value="protected">Public/Protected</li><li data-value="private" class="selected">All</li></ul></div> <input type="checkbox" id="tsd-filter-inherited" checked/><label class="tsd-widget" for="tsd-filter-inherited">Inherited</label><input type="checkbox" id="tsd-filter-externals" checked/><label class="tsd-widget" for="tsd-filter-externals">Externals</label></div></div><a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a></div></div></div></div><div class="tsd-page-title"><div class="container"><ul class="tsd-breadcrumb"><li><a href="../modules.html">sern-handler</a></li><li><a href="Sern.html">Sern</a></li></ul><h1>Namespace Sern</h1></div></div></header><div class="container container-main"><div class="row"><div class="col-8 col-content"><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Enumerations</h3><ul class="tsd-index-list"><li class="tsd-kind-enum tsd-parent-kind-namespace"><a href="../enums/Sern.CommandType.html" class="tsd-kind-icon">Command<wbr/>Type</a></li></ul></section><section class="tsd-index-section "><h3>Classes</h3><ul class="tsd-index-list"><li class="tsd-kind-class tsd-parent-kind-namespace"><a href="../classes/Sern.Handler.html" class="tsd-kind-icon">Handler</a></li></ul></section><section class="tsd-index-section "><h3>Interfaces</h3><ul class="tsd-index-list"><li class="tsd-kind-interface tsd-parent-kind-namespace tsd-has-type-parameter"><a href="../interfaces/Sern.Module.html" class="tsd-kind-icon">Module</a></li><li class="tsd-kind-interface tsd-parent-kind-namespace"><a href="../interfaces/Sern.Wrapper.html" class="tsd-kind-icon">Wrapper</a></li></ul></section></div></section></section></div><div class="col-4 col-menu menu-sticky-wrap menu-highlight"><nav class="tsd-navigation primary"><ul><li class=""><a href="../modules.html">Exports</a></li><li class="current tsd-kind-namespace"><a href="Sern.html">Sern</a></li><li class=" tsd-kind-namespace"><a href="Types.html">Types</a></li><li class=" tsd-kind-namespace"><a href="Utils.html">Utils</a></li></ul></nav><nav class="tsd-navigation secondary menu-sticky"><ul><li class="tsd-kind-enum tsd-parent-kind-namespace"><a href="../enums/Sern.CommandType.html" class="tsd-kind-icon">Command<wbr/>Type</a></li><li class="tsd-kind-class tsd-parent-kind-namespace"><a href="../classes/Sern.Handler.html" class="tsd-kind-icon">Handler</a></li><li class="tsd-kind-interface tsd-parent-kind-namespace tsd-has-type-parameter"><a href="../interfaces/Sern.Module.html" class="tsd-kind-icon">Module</a></li><li class="tsd-kind-interface tsd-parent-kind-namespace"><a href="../interfaces/Sern.Wrapper.html" class="tsd-kind-icon">Wrapper</a></li></ul></nav></div></div></div><footer class="with-border-bottom"><div class="container"><h2>Settings</h2><p>Theme <select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></p></div></footer><div class="container tsd-generator"><p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div><div class="overlay"></div><script src="../assets/main.js"></script></body></html>
|
||||
<!DOCTYPE html>
|
||||
<html class="default">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="x-ua-compatible" content="IE=edge" />
|
||||
<title>Sern | sern-handler</title>
|
||||
<meta name="description" content="Documentation for sern-handler" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<link rel="stylesheet" href="../assets/style.css" />
|
||||
<link rel="stylesheet" href="../assets/highlight.css" />
|
||||
<script async src="../assets/search.js" id="search-script"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
document.body.classList.add(localStorage.getItem('tsd-theme') || 'os');
|
||||
</script>
|
||||
<header>
|
||||
<div class="tsd-page-toolbar">
|
||||
<div class="container">
|
||||
<div class="table-wrap">
|
||||
<div class="table-cell" id="tsd-search" data-base="..">
|
||||
<div class="field">
|
||||
<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label
|
||||
><input type="text" id="tsd-search-field" />
|
||||
</div>
|
||||
<ul class="results">
|
||||
<li class="state loading">Preparing search index...</li>
|
||||
<li class="state failure">The search index is not available</li>
|
||||
</ul>
|
||||
<a href="../index.html" class="title">sern-handler</a>
|
||||
</div>
|
||||
<div class="table-cell" id="tsd-widgets">
|
||||
<div id="tsd-filter">
|
||||
<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
|
||||
<div class="tsd-filter-group">
|
||||
<div class="tsd-select" id="tsd-filter-visibility">
|
||||
<span class="tsd-select-label">All</span>
|
||||
<ul class="tsd-select-list">
|
||||
<li data-value="public">Public</li>
|
||||
<li data-value="protected">Public/Protected</li>
|
||||
<li data-value="private" class="selected">All</li>
|
||||
</ul>
|
||||
</div>
|
||||
<input type="checkbox" id="tsd-filter-inherited" checked /><label
|
||||
class="tsd-widget"
|
||||
for="tsd-filter-inherited"
|
||||
>Inherited</label
|
||||
><input type="checkbox" id="tsd-filter-externals" checked /><label
|
||||
class="tsd-widget"
|
||||
for="tsd-filter-externals"
|
||||
>Externals</label
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tsd-page-title">
|
||||
<div class="container">
|
||||
<ul class="tsd-breadcrumb">
|
||||
<li><a href="../modules.html">sern-handler</a></li>
|
||||
<li><a href="Sern.html">Sern</a></li>
|
||||
</ul>
|
||||
<h1>Namespace Sern</h1>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<div class="container container-main">
|
||||
<div class="row">
|
||||
<div class="col-8 col-content">
|
||||
<section class="tsd-panel-group tsd-index-group">
|
||||
<h2>Index</h2>
|
||||
<section class="tsd-panel tsd-index-panel">
|
||||
<div class="tsd-index-content">
|
||||
<section class="tsd-index-section">
|
||||
<h3>Enumerations</h3>
|
||||
<ul class="tsd-index-list">
|
||||
<li class="tsd-kind-enum tsd-parent-kind-namespace">
|
||||
<a href="../enums/Sern.CommandType.html" class="tsd-kind-icon">Command<wbr />Type</a>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section class="tsd-index-section">
|
||||
<h3>Classes</h3>
|
||||
<ul class="tsd-index-list">
|
||||
<li class="tsd-kind-class tsd-parent-kind-namespace">
|
||||
<a href="../classes/Sern.Handler.html" class="tsd-kind-icon">Handler</a>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section class="tsd-index-section">
|
||||
<h3>Interfaces</h3>
|
||||
<ul class="tsd-index-list">
|
||||
<li class="tsd-kind-interface tsd-parent-kind-namespace tsd-has-type-parameter">
|
||||
<a href="../interfaces/Sern.Module.html" class="tsd-kind-icon">Module</a>
|
||||
</li>
|
||||
<li class="tsd-kind-interface tsd-parent-kind-namespace">
|
||||
<a href="../interfaces/Sern.Wrapper.html" class="tsd-kind-icon">Wrapper</a>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
</div>
|
||||
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
|
||||
<nav class="tsd-navigation primary">
|
||||
<ul>
|
||||
<li class=""><a href="../modules.html">Exports</a></li>
|
||||
<li class="current tsd-kind-namespace"><a href="Sern.html">Sern</a></li>
|
||||
<li class="tsd-kind-namespace"><a href="Types.html">Types</a></li>
|
||||
<li class="tsd-kind-namespace"><a href="Utils.html">Utils</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
<nav class="tsd-navigation secondary menu-sticky">
|
||||
<ul>
|
||||
<li class="tsd-kind-enum tsd-parent-kind-namespace">
|
||||
<a href="../enums/Sern.CommandType.html" class="tsd-kind-icon">Command<wbr />Type</a>
|
||||
</li>
|
||||
<li class="tsd-kind-class tsd-parent-kind-namespace">
|
||||
<a href="../classes/Sern.Handler.html" class="tsd-kind-icon">Handler</a>
|
||||
</li>
|
||||
<li class="tsd-kind-interface tsd-parent-kind-namespace tsd-has-type-parameter">
|
||||
<a href="../interfaces/Sern.Module.html" class="tsd-kind-icon">Module</a>
|
||||
</li>
|
||||
<li class="tsd-kind-interface tsd-parent-kind-namespace">
|
||||
<a href="../interfaces/Sern.Wrapper.html" class="tsd-kind-icon">Wrapper</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<footer class="with-border-bottom">
|
||||
<div class="container">
|
||||
<h2>Settings</h2>
|
||||
<p>
|
||||
Theme
|
||||
<select id="theme">
|
||||
<option value="os">OS</option>
|
||||
<option value="light">Light</option>
|
||||
<option value="dark">Dark</option>
|
||||
</select>
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
<div class="container tsd-generator">
|
||||
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p>
|
||||
</div>
|
||||
<div class="overlay"></div>
|
||||
<script src="../assets/main.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
21
package.json
21
package.json
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@sern/handler",
|
||||
"version": "0.0.1",
|
||||
"description": "",
|
||||
"version": "1.0.0-beta",
|
||||
"description": "A customizable, batteries-included, powerful discord.js framework to automate and streamline bot development.",
|
||||
"main": "dist/index.js",
|
||||
"scripts": {
|
||||
"compile": "tsc",
|
||||
@@ -10,12 +10,19 @@
|
||||
"format": "eslint src/**/*.ts --fix",
|
||||
"release": "standard-version && git push --follow-tags",
|
||||
"test": "jest --coverage --verbose",
|
||||
"commit": "cz",
|
||||
"docs": "typedoc src/index.ts --out docs"
|
||||
"commit": "cz"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"keywords": [
|
||||
"sern-handler",
|
||||
"sern",
|
||||
"handler",
|
||||
"sern handler",
|
||||
"wrapper",
|
||||
"discord.js",
|
||||
"framework"
|
||||
],
|
||||
"author": "SernDevs",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"discord.js": "^14.0.0-dev.1647259751.2297c2b",
|
||||
"rxjs": "^7.5.5",
|
||||
|
||||
@@ -1,3 +1,12 @@
|
||||
/*
|
||||
* ---------------------------------------------------------------------
|
||||
* Copyright (C) 2022 Sern
|
||||
* This software is licensed under the MIT License.
|
||||
* See LICENSE.md in the project root for license information.
|
||||
* ---------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
export * as Sern from './handler/sern';
|
||||
export * from './types/handler';
|
||||
export * from './handler/structures/structxports';
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import type { Awaitable, ClientEvents, CommandInteractionOptionResolver } from 'discord.js';
|
||||
import type { EventEmitter } from 'events';
|
||||
export type Nullish<T> = T | undefined | null;
|
||||
// Thanks @cursorsdottsx
|
||||
|
||||
// Thanks to @kelsny
|
||||
export type ParseType<T> = {
|
||||
[K in keyof T]: T[K] extends unknown ? [k: K, args: T[K]] : never;
|
||||
}[keyof T];
|
||||
@@ -19,7 +20,7 @@ export type EventEmitterRegister = [
|
||||
|
||||
export type SlashOptions = Omit<CommandInteractionOptionResolver, 'getMessage' | 'getFocused'>;
|
||||
|
||||
//https://dev.to/vborodulin/ts-how-to-override-properties-with-type-intersection-554l
|
||||
// Source: https://dev.to/vborodulin/ts-how-to-override-properties-with-type-intersection-554l
|
||||
export type Override<T1, T2> = Omit<T1, keyof T2> & T2;
|
||||
|
||||
export type DefinitelyDefined<T, K> = T & Override<T, K>;
|
||||
|
||||
Reference in New Issue
Block a user