NPM package to make the Kifo Clanker™ cleaner and easier to manage.
npm install kifo
in your terminalconst kifo = require("kifo");
in your code
... and that's it!
make sure you have
npm
installed.
Main usage of this package is to help develop Kifo Clanker™. However, there are some actually useful features that other bot developers could use (like RegExs).
converts string (body
) with optional title to embed message
.
perpetrator
-Discord.User
that used the command (visible in footer)client
-Discord.Client
that instantiated this (visible in title)
Trims mentions to Ids. For instance, "<@KifoPL>
" returns "KifoPL
", "<@&123123123>
" returns "123123123
", "42069
" returns "42069
".
mention
-string
to trim.
Returns Id of emoji, really handy for handling reactions, etc.
emojiIdentifier
- The<a:name:id>
,<:name:id>
,a:name:id
orname:id
emoji identifierstring
of an emoji
returns number with place abbreviation: for 1
returns 1st
, 2
- 2nd
, etc...
number
- the place
Determines, what the mention or Id is.
message
- The message sentwhatisthis
- The argument in question (either mention or Id)allowWords
- True if "me" results in member and "here" in channel (case in-sensitive), false otherwise.callback
-
{
entity: Discord.GuildMember || Discord.GuildChannel || Discord.GuildRole || Discord.Message || undefined,
whatAmI: "member" || "channel" || "role" || "message" || "not found" //(that's because if the function breaks, it will return `undefined`, + it's easier to do if statements)
}
Returns RegEx
fitting all Unicode Emojis.
Returns RegEx
fitting all URLs starting with http://
or https://
Returns array with Id
, name
, type
, aliases
of channel perms
.
[
(VIEW_CHANNEL = {
Id: 1,
name: "VIEW_CHANNEL",
type: "text",
aliases: ["view", "vch"],
}),
...
]
- my links
- npm package site,
- The Galactic Republic Discord Server
- Discord Support Server
- PayPal - (electricity and internet bills cost a lot of money, donations motivate me to continue my work developing this package and the bot)