Home Manual Reference Source Repository

src/index.js

  1. 'use babel';
  2. 'use strict';
  3.  
  4. import { readFileSync } from 'fs';
  5. import { join as pathJoin } from 'path';
  6. import _Bot from './bot';
  7. import _Permissions from './bot/permissions';
  8. import _Util from './bot/util';
  9. import _Command from './commands/command';
  10. import _Module from './commands/module';
  11. import _GuildStorage from './storage';
  12. import _Setting from './storage/models/setting';
  13. import _FriendlyError from './errors/friendly';
  14. import _CommandFormatError from './errors/command-format';
  15.  
  16. /**
  17. * The version of GRAF
  18. * @type {string}
  19. */
  20. export const version = JSON.parse(readFileSync(pathJoin(__dirname, '../package.json'))).version;
  21.  
  22. /**
  23. * The {@link Bot} class
  24. * @type {function}
  25. */
  26. export const Bot = _Bot;
  27. export default Bot;
  28.  
  29. /**
  30. * The {@link Command} class
  31. * @type {function}
  32. */
  33. export const Command = _Command;
  34.  
  35. /**
  36. * The {@link Module} class
  37. * @type {function}
  38. */
  39. export const Module = _Module;
  40.  
  41. /**
  42. * The {@link BotPermissions} class
  43. * @type {function}
  44. */
  45. export const Permissions = _Permissions;
  46.  
  47. /**
  48. * The {@link BotUtil} class
  49. * @type {function}
  50. */
  51. export const Util = _Util;
  52.  
  53. /**
  54. * The {@link GuildStorage} class
  55. * @type {function}
  56. */
  57. export const GuildStorage = _GuildStorage;
  58.  
  59. /**
  60. * The {@link Setting} class
  61. * @type {function}
  62. */
  63. export const Setting = _Setting;
  64.  
  65. /**
  66. * The {@link FriendlyError} class
  67. * @type {function}
  68. */
  69. export const FriendlyError = _FriendlyError;
  70.  
  71. /**
  72. * The {@link CommandFormatError} class
  73. * @type {function}
  74. */
  75. export const CommandFormatError = _CommandFormatError;
  76.  
  77. /** @external {Client} http://hydrabolt.github.io/discord.js/index.html#!/docs/tag/master/class/Client */
  78. /** @external {User} http://hydrabolt.github.io/discord.js/index.html#!/docs/tag/master/class/User */
  79. /** @external {Guild} http://hydrabolt.github.io/discord.js/index.html#!/docs/tag/master/class/Guild */
  80. /** @external {Channel} http://hydrabolt.github.io/discord.js/index.html#!/docs/tag/master/class/Channel */
  81. /** @external {Message} http://hydrabolt.github.io/discord.js/index.html#!/docs/tag/master/class/Message */
  82. /** @external {Role} http://hydrabolt.github.io/discord.js/index.html#!/docs/tag/master/class/Role */
  83. /** @external {Logger} https://github.com/winstonjs/winston/blob/master/README.md */
  84. /** @external {LocalStorage} https://developer.mozilla.org/en-US/docs/Web/API/Storage */