Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

feat: d.js v14 #165

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Need support? Join the [Idiot's Guide Community](https://discord.gg/vXVxsAjSMF)!
## Requirements

- `git` command line ([Windows](https://git-scm.com/download/win) | [Linux](https://git-scm.com/download/linux) | [MacOS](https://git-scm.com/download/mac)) installed
- `node` [Version 16.x](https://nodejs.org)
- `node` [Version 16.9.0 or higher](https://nodejs.org)
- The node-gyp build tools. This is a pre-requisite for Enmap, but also for a **lot** of other modules. See [The Enmap Guide](https://enmap.evie.codes/install#pre-requisites) for details and requirements for your OS. Just follow what's in the tabbed block only, then come back here!

You also need your bot's token. This is obtained by creating an application in
Expand Down Expand Up @@ -67,3 +67,12 @@ To add the bot to your guild, you have to get an oauth link for it.

You can use this site to help you generate a full OAuth Link, which includes a calculator for the permissions:
[Permission Calculator](https://finitereality.github.io/permissions-calculator/?v=0)

## Deploying Slash Commands

By default, all slash commands are not deployed. To deploy slash commands, you need to run the deploy command on your bot.
You may do so by running:

`@GuideBot deploy`

You will need to do this every time you add a new slash command.
2 changes: 1 addition & 1 deletion commands/conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ change it for that guild. The `add` action adds a key to the configuration of ev
your bot. The `del` action removes the key also from every guild, and loses its value forever.
*/

const { codeBlock } = require("@discordjs/builders");
const { codeBlock } = require("discord.js");
const config = require("../config.js");
const { awaitReply } = require("../modules/functions.js");
const { settings } = require("../modules/settings.js");
Expand Down
2 changes: 1 addition & 1 deletion commands/eval.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// can be used to do **anything** on your machine, from stealing information to
// purging the hard drive. DO NOT LET ANYONE ELSE USE THIS

const { codeBlock } = require("@discordjs/builders");
const { codeBlock } = require("discord.js");

/*
MESSAGE CLEAN FUNCTION
Expand Down
2 changes: 1 addition & 1 deletion commands/help.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ command is also filtered by level, so if a user does not have access to
a command, it is not shown to them. If a command name is given with the
help command, its extended help is shown.
*/
const { codeBlock } = require("@discordjs/builders");
const { codeBlock } = require("discord.js");
const { toProperCase } = require("../modules/functions.js");

exports.run = (client, message, args, level) => {
Expand Down
2 changes: 1 addition & 1 deletion commands/set.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// const action = args[0]; const key = args[1]; const value = args.slice(2);
// OR the same as:
// const [action, key, ...value] = args;
const { codeBlock } = require("@discordjs/builders");
const { codeBlock } = require("discord.js");
const { settings } = require("../modules/settings.js");
const { awaitReply } = require("../modules/functions.js");

Expand Down
3 changes: 1 addition & 2 deletions commands/stats.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
const { version } = require("discord.js");
const { codeBlock } = require("@discordjs/builders");
const { version, codeBlock } = require("discord.js");
const { DurationFormatter } = require("@sapphire/time-utilities");
const durationFormatter = new DurationFormatter();

Expand Down
8 changes: 5 additions & 3 deletions config.js.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { Intents } = require("discord.js");
const { IntentsBitField, Partials } = require("discord.js");

/* config */
const config = {
Expand All @@ -12,11 +12,13 @@ const config = {
* Intents the bot needs.
* By default GuideBot needs Guilds, Guild Messages and Direct Messages to work.
* For join messages to work you need Guild Members, which is privileged and requires extra setup.
* The bot also needs the Message Content intent to receive messages with its prefix. This is also privileged.
* If this intent isn't provided you will need to ping the bot to use text commands.
* For more info about intents see the README.
*/
intents: [ Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_MESSAGES, Intents.FLAGS.DIRECT_MESSAGES ],
intents: [IntentsBitField.Flags.Guilds, IntentsBitField.Flags.GuildMessages, IntentsBitField.Flags.DirectMessages],
// Partials your bot may need should go here, CHANNEL is required for DM's
partials: ["CHANNEL"],
partials: [Partials.Channel],

/*
* Default per-server settings. These settings are entered in a database on first load,
Expand Down
Loading