Giter Club home page Giter Club logo

supi-core's People

Contributors

dependabot[bot] avatar eulehaken avatar jprochazk avatar nerixyz avatar notnotquinn avatar randers00 avatar supinic avatar tetyys avatar zneix avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

supi-core's Issues

Prevent fatal errors from `got` instances' functions

Instead of having a got instance crash the entire process due to its options init function, render the instance unusable. The instance should throw a different error when it is attempted to be used, and even mention the error thrown during its initialize.

Reference error:

/home/debjd167/KautionTV_BOT/supibot/node_modules/supi-core/classes/config.js:305

CustomError [sb.Error]: Configuration variable does not exist
- arguments: "VIMEO_API_KEY"

    at Function.get (/home/debjd167/KautionTV_BOT/supibot/node_modules/supi-core/classes/config.js:305:11)
    at Object.options (file:///home/debjd167/KautionTV_BOT/supibot/node_modules/supibot-package-manager/got/vimeo/index.mjs:7:39)
    at Proxy.loadData (/home/debjd167/KautionTV_BOT/supibot/node_modules/supi-core/classes/got.js:32:21)
    at async Proxy.initialize (/home/debjd167/KautionTV_BOT/supibot/node_modules/supi-core/classes/template.js:249:3)
    at async /home/debjd167/KautionTV_BOT/supibot/node_modules/supi-core/index.js:139:52
    at async /home/debjd167/KautionTV_BOT/supibot/master.js:15:18

Mentions are applied after banphrases

const metaSkip = Boolean(options.skipBanphrases || execution?.meta?.skipBanphrases);
if (!command.Flags.skipBanphrase && !metaSkip) {
const { passed, privateMessage, string } = await sb.Banphrase.execute(execution.reply.slice(0, 1000), channelData);
execution.reply = string;

const mentionUser = Boolean(
!options.skipMention
&& command.Flags.mention
&& channelData?.Mention
&& await sb.Filter.getMentionStatus({
user: userData,
command: command,
channel: channelData ?? null,
platform: channelData?.Platform ?? null
})
);

Mentions should be applied before banphrases to not have usernames trigger pajbot banphrases.
Supibot getting timed out for mentioning a user

Found by @Fawcan, I read the code.

Documentation roadmap

Classes

  • Template
  • Command
    • Context
  • User
  • Channel
  • Platform
  • ChatModule
  • Cron
  • AFK
  • Banphrase
  • Filter
  • Config

Documentation for supi-core is lacking, this roadmap presents in which order these should be documented.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.