Skip to content
This repository was archived by the owner on Jul 26, 2018. It is now read-only.

Latest commit

 

History

History
74 lines (61 loc) · 3.2 KB

File metadata and controls

74 lines (61 loc) · 3.2 KB

RuneCord Icon

A bot just for RuneScape.

Installing:

  1. Install NodeJS Git and Python 2.7 (and add them to your PATH).
  2. Download RuneCord and configure it using the reference below.
  3. Run npm i --no-optional --production and then, optionally, npm i eventemitter3 --no-optional --production.
  4. Make any modifications.
  5. Add your bot using https://discordapp.com/oauth2/authorize?client_id=YOUR_CLIENT_ID&scope=bot.
  6. Run the bot with node index.js.

Example of a command

// Runecord/commands/examples/example.js
// Only 'task' is required. Everything else is optional.

module.exports {
	desc: "A short description",
	help: "A longer description of what the command does and how to use it",
	usage: "<hello> [world]",
	aliases: ['ex', 'e'], // Aliases 'ex' and 'e'
	cooldown: 5, // 5 seconds
	hidden: true, // Hidden from help command
	ownerOnly: true, // Only a user in config.adminIds can use this command
	guildOnly: true, // This command can't be used in a DM, only in guilds
	requiredPermission: 'manageMessages', // You need the 'manageMessages' permission to use this command
	task(bot, msg, suffix, config, settingsManager) { // Available args (only bot & msg are required)
		if (suffix.startsWith('hello')) {
			return bot.createMessage(msg.channel.id, suffix);
		}
		return 'wrong usage'; // If the suffix doesn't say 'hello', it sends the correct usage to the user.
	}
}

Example of an event

// RuneCord/events/guildCreate.js

module.exports = function(bot, settingsManager, config, guild) {
	if (config.logNewGuilds) {
		console.log(`New Guild: ${guild.name}`);
	}
}

Config Reference

  • token: The bot's token
  • shardCount: The number of shards to run.
  • disableEvents: An object containing events to disable. This saves resources. A full list of events can be found here: Eris Reference.
  • commandSets: An object defining what commands to load. The key is the prefix, dir is the path to the files from the root of the bot. If you want to make the commands a certain color in the console, add a color property with a valid chalk color.
  • reloadCommand: The command to use for reloading modules/commands.
  • evalCommand: The command to use for running arbitrary code.
  • adminIds: An array of user ids that have full control over the bot.
  • logTimestamp: If the console should include timestamps.
  • inviteLink: A link to add the bot to a server.
  • errorMessage: An optional error message to post in chat.
  • carbonKey: Your key for updating carbon information.
  • abalBotsKey: Your https://bot.discord.pw/ API key.
  • cycleGames: Randomly changes the bot's status.

Naming commands and invalid prefixes

Command names must not contain a space or a |. Prefixed must not contain a |. Avoid using @ as it may resolve into a user.


Disclaimer: I may or may not keep up-to-date with this documentation.