Skip to content
This repository has been archived by the owner on Dec 2, 2018. It is now read-only.

PrefixAll: add service prefix #7

Open
brawaru opened this issue Oct 4, 2018 · 0 comments
Open

PrefixAll: add service prefix #7

brawaru opened this issue Oct 4, 2018 · 0 comments

Comments

@brawaru
Copy link
Member

brawaru commented Oct 4, 2018

For PrefixAl' core module, add service prefix which can only be used by the bot owner.

Service prefix must be configurable, but may have a default value of…

// ❄ Snowball Bot

function getPrefix() {
	const tag = $botConfig.name
		.match(/[a-z_\-0-9 ]+/i)[0]
			.trim()
			.replace(/ /g, "_")
			.toLowerCase();

	return `${tag}:`;
}

// snowball_bot:

This spaghetti above returns good complex prefix which with big change will not be used by any other bot.

Examples of commands with this prefix:

  • snowball_bot:change_avatar
  • snowball_bot:change_name
  • snowball_bot:ping

Good, isn't it?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant