Git Product home page Git Product logo

Comments (2)

eddiejaoude avatar eddiejaoude commented on June 7, 2024 1

Good idea ๐Ÿ‘ . Especially now we want to change it so it doesn't conflict with NightBot

@garretcharp did this in his PR https://github.com/eddiejaoude/EddieBot/pull/39/files#diff-7e82dc7533620e594f349d3ea425b5b4R4 which is now merged into develop

from eddiebot.

BOLT04 avatar BOLT04 commented on June 7, 2024

We could take this opportunity to change the code that "hardcodes" that ! prefix, like:

.addField('!help', 'Lists available commands', true)
.addField('!coc', 'Code of Conduct', true)

to

.addField(`${prefix}help`, 'Lists available commands', true)
.addField(`${prefix}coc`, 'Code of Conduct', true)

It's not as pretty ๐Ÿ˜…, but we can easily change the prefix in only one spot, instead of searching for all occurrences of !. In order to have it in only one place, we could also export this constant on the commands file, instead of being a local variable. That way it can be used all across the application (e.g. chatty.ts).

from eddiebot.

Related Issues (20)

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.