diff --git a/app/commands/add-feed.js b/app/commands/add-feed.js index 29a8765..c38af41 100644 --- a/app/commands/add-feed.js +++ b/app/commands/add-feed.js @@ -1,6 +1,6 @@ const { promisify } = require("util"); const Config = require("../config.json"); -const Core = require("../../discord-bot-core"); +const Core = require("../../core"); const FeedData = require("../models/feed-data.js"); const GetUrls = require("get-urls"); const ShortID = require("shortid"); diff --git a/app/commands/remove-feed.js b/app/commands/remove-feed.js index af32a89..1e48295 100644 --- a/app/commands/remove-feed.js +++ b/app/commands/remove-feed.js @@ -1,4 +1,4 @@ -const Core = require("../../discord-bot-core"); +const Core = require("../../core"); module.exports = new Core.Command({ name: "remove-feed", diff --git a/app/commands/view-feeds.js b/app/commands/view-feeds.js index d20c571..ab28240 100644 --- a/app/commands/view-feeds.js +++ b/app/commands/view-feeds.js @@ -1,4 +1,4 @@ -const Core = require("../../discord-bot-core"); +const Core = require("../../core"); const Config = require("../config.json"); module.exports = new Core.Command({ diff --git a/app/index.js b/app/index.js index 70987c8..49ae56e 100644 --- a/app/index.js +++ b/app/index.js @@ -1,4 +1,4 @@ -const Core = require("../discord-bot-core"); +const Core = require("../core"); const GetUrls = require("get-urls"); const GuildData = require("./models/guild-data.js"); // @ts-ignore diff --git a/app/models/feed-data.js b/app/models/feed-data.js index c3a31cb..286f2ec 100644 --- a/app/models/feed-data.js +++ b/app/models/feed-data.js @@ -3,8 +3,8 @@ const Config = require("../config.json"); const { promisify } = require("util"); const Camo = require("camo"); -const Core = require("../../discord-bot-core"); -const DiscordUtil = require("../../discord-bot-core").util; +const Core = require("../../core"); +const DiscordUtil = require("../../core").util; const GetUrls = require("get-urls"); const Url = require("url"); diff --git a/app/models/guild-data.js b/app/models/guild-data.js index f1274e6..312fbf4 100644 --- a/app/models/guild-data.js +++ b/app/models/guild-data.js @@ -1,4 +1,4 @@ -const Core = require("../../discord-bot-core"); +const Core = require("../../core"); const FeedData = require("./feed-data.js"); module.exports = class GuildData extends Core.BaseGuildData { diff --git a/discord-bot-core/.gitignore b/core/.gitignore similarity index 100% rename from discord-bot-core/.gitignore rename to core/.gitignore diff --git a/discord-bot-core/.gitrepo b/core/.gitrepo similarity index 100% rename from discord-bot-core/.gitrepo rename to core/.gitrepo diff --git a/discord-bot-core/.npmrc b/core/.npmrc similarity index 100% rename from discord-bot-core/.npmrc rename to core/.npmrc diff --git a/discord-bot-core/LICENSE b/core/LICENSE similarity index 100% rename from discord-bot-core/LICENSE rename to core/LICENSE diff --git a/discord-bot-core/README.md b/core/README.md similarity index 91% rename from discord-bot-core/README.md rename to core/README.md index bc9d11c..2735ffa 100644 --- a/discord-bot-core/README.md +++ b/core/README.md @@ -16,12 +16,12 @@ A good candidate is my [template project](https://github.com/benji7425/discord-b ## Contributing The easiest way to get setup would be a fork of this repo, and the fork of a bot to use as a development context. -I suggest using my [template project](https://github.com/benji7425/discord-bot-template) as a development context, along with [git subrepo](https://github.com/ingydotnet/git-subrepo) to push back to your discord-bot-core fork. -If you are uncomfortable using git subrepo, you could just as easily copy/paste your child `discord-bot-core` directory back into your fork. +I suggest using my [template project](https://github.com/benji7425/discord-bot-template) as a development context, along with [git subrepo](https://github.com/ingydotnet/git-subrepo) to push back to your core fork. +If you are uncomfortable using git subrepo, you could just as easily copy/paste your child `core` directory back into your fork. My [template project](https://github.com/benji7425/discord-bot-template) has more in-depth details about how to setup and test. -If you have a completed change, please submit a pull request from your `discord-bot-core` fork back to this repo. +If you have a completed change, please submit a pull request from your `core` fork back to this repo. Whilst this is very easy to use once you know how, I appreciate this might be a little tricky if you aren't familiar with developing in this way. Feel free to contact me if you would like assistance. Find contact details [here](https://benji7425.github.io/contact). diff --git a/discord-bot-core/base-embedded-data.js b/core/base-embedded-data.js similarity index 100% rename from discord-bot-core/base-embedded-data.js rename to core/base-embedded-data.js diff --git a/discord-bot-core/base-guild-data.js b/core/base-guild-data.js similarity index 100% rename from discord-bot-core/base-guild-data.js rename to core/base-guild-data.js diff --git a/discord-bot-core/client.js b/core/client.js similarity index 100% rename from discord-bot-core/client.js rename to core/client.js diff --git a/discord-bot-core/command.js b/core/command.js similarity index 100% rename from discord-bot-core/command.js rename to core/command.js diff --git a/discord-bot-core/core-commands/help.js b/core/commands/help.js similarity index 100% rename from discord-bot-core/core-commands/help.js rename to core/commands/help.js diff --git a/discord-bot-core/core-commands/reset.js b/core/commands/reset.js similarity index 100% rename from discord-bot-core/core-commands/reset.js rename to core/commands/reset.js diff --git a/discord-bot-core/core-commands/version.js b/core/commands/version.js similarity index 100% rename from discord-bot-core/core-commands/version.js rename to core/commands/version.js diff --git a/discord-bot-core/handle-guild-message.js b/core/handle-guild-message.js similarity index 94% rename from discord-bot-core/handle-guild-message.js rename to core/handle-guild-message.js index aadee27..30e1856 100644 --- a/discord-bot-core/handle-guild-message.js +++ b/core/handle-guild-message.js @@ -1,6 +1,6 @@ const RequireAll = require("require-all"); -const internalCommands = RequireAll(__dirname + "/core-commands"); +const internalCommands = RequireAll(__dirname + "/commands"); function handleGuildMessage(client, message, commands) { if (isCommand(message)) diff --git a/discord-bot-core/index.js b/core/index.js similarity index 100% rename from discord-bot-core/index.js rename to core/index.js diff --git a/discord-bot-core/internal-config.json b/core/internal-config.json similarity index 100% rename from discord-bot-core/internal-config.json rename to core/internal-config.json diff --git a/discord-bot-core/package-lock.json b/core/package-lock.json similarity index 100% rename from discord-bot-core/package-lock.json rename to core/package-lock.json diff --git a/discord-bot-core/package.json b/core/package.json similarity index 66% rename from discord-bot-core/package.json rename to core/package.json index f2c866a..0826ec3 100644 --- a/discord-bot-core/package.json +++ b/core/package.json @@ -10,16 +10,16 @@ "require-all": "2.2.0", "simple-file-writer": "2.0.0" }, - "name": "discord-bot-core", + "name": "core", "repository": { "type": "git", - "url": "git+https://github.com/benji7425/discord-bot-core.git" + "url": "git+https://github.com/benji7425/core.git" }, "author": "", "license": "ISC", "bugs": { - "url": "https://github.com/benji7425/discord-bot-core/issues" + "url": "https://github.com/benji7425/core/issues" }, - "homepage": "https://github.com/benji7425/discord-bot-core#readme", + "homepage": "https://github.com/benji7425/core#readme", "description": "Core code shared amongst my Discord bots" } diff --git a/discord-bot-core/util.js b/core/util.js similarity index 100% rename from discord-bot-core/util.js rename to core/util.js diff --git a/package.json b/package.json index 1faa9ca..3c9a314 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "version": "3.5.0-b3", "main": "app/index.js", "scripts": { - "postinstall": "cd ./discord-bot-core && npm install", + "postinstall": "cd ./core && npm install", "start": "node ./app/index.js --name=rss-feed" }, "dependencies": {