Skip to content
This repository was archived by the owner on Jun 6, 2025. It is now read-only.

Commit 6052941

Browse files
authored
v4.0.1 release
v4.0.1
2 parents 445bd3a + f1027a6 commit 6052941

File tree

9 files changed

+22
-37
lines changed

9 files changed

+22
-37
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,9 @@
1-
---
2-
name: Bug report
3-
about: Create a report to help us improve
4-
title: 'Bug Report'
5-
labels: 'bug'
6-
assignees: ''
7-
---
8-
9-
**Describe the bug**
1+
## Describe the bug
2+
103
A clear description of what the bug is.
114

12-
**To Reproduce**
5+
### To Reproduce
6+
137
Steps to reproduce the behavior:
148

159
1. Run the bot

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
---
2-
name: Feature request
3-
about: Suggest an idea for this project
4-
title: ''
5-
labels: 'feature'
6-
assignees: ''
7-
---
8-
91
**Is your feature request related to a problem? Please describe.**
102
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
113

.github/SECURITY.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ currently being supported with security updates.
1414

1515
| Version | Supported |
1616
| ------- | ------------------ |
17-
| 14.10.x | :white_check_mark: |
18-
| 12.5.x | :x: |
17+
| 14.x.x | :white_check_mark: |
18+
| 13.x.x | :x: |
1919

2020
## Reporting a Vulnerability
2121

.github/pull_request_template.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
---
2-
name: Pull Request
3-
about: Improve the package by contributing.
4-
title: 'Pull Request'
5-
labels: 'pr'
6-
assignees: ''
7-
---
8-
91
# Description
102

113
_Overview of the things you changed_

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "simply-djs",
3-
"version": "4.0.0",
3+
"version": "4.0.1",
44
"description": "The simplest way to build complex Discord bots.",
55
"main": "lib/simplydjs.js",
66
"types": "typings/simplydjs.d.ts",

src/chatbot.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ import { https } from './misc';
33
import { SimplyError } from './error';
44
import { ExtendedMessage } from './typedef';
55

6-
import { Configuration, OpenAIApi } from 'openai';
7-
86
// ------------------------------
97
// ------- T Y P I N G S --------
108
// ------------------------------
@@ -88,6 +86,15 @@ export async function chatbot(
8886

8987
// For ChatGPT integration.
9088
if (options?.gptToken) {
89+
const { Configuration, OpenAIApi } = await import('openai').catch(
90+
() => {
91+
throw new SimplyError({
92+
function: 'chatbot',
93+
title: "Cannot find the module 'openai'",
94+
tip: 'To use the chatbot with gpt, you need to install openai package. Use\n\nnpm install openai\n'
95+
});
96+
}
97+
);
9198
await message.channel.sendTyping();
9299

93100
const configuration = new Configuration({

src/ghostPing.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export async function ghostPing(
5252
);
5353
}
5454
})
55-
.catch((_err) => {
55+
.catch(() => {
5656
return true;
5757
});
5858

src/starboard.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,21 +126,21 @@ export async function starboard(
126126
react.emoji.name == '⭐' ||
127127
react.emoji.name == '🌟'
128128
) {
129-
const minmax = react.count;
129+
const count = react.count;
130130

131131
const starboard = await client.channels.fetch(options.channelId, {
132132
force: true,
133133
cache: true
134134
});
135135

136-
if (minmax < minimumRequired) {
136+
if (count < minimumRequired) {
137137
const messages = await (starboard as TextChannel)?.messages.fetch({
138138
limit: 100
139139
});
140140

141141
const existing = messages.find(
142142
(msg) =>
143-
msg.embeds[0]?.footer?.text == '⭐ | ID: ' + extMessage.id
143+
msg.embeds[0]?.footer?.text == '⭐ | ID: ' + react.message.id
144144
);
145145

146146
if (existing) {

0 commit comments

Comments
 (0)