Skip to content

Commit

Permalink
Merge pull request #57 from Guilded-Bot-NPM/v1.1.1
Browse files Browse the repository at this point in the history
fix(Message): Little Bug Fixed
  • Loading branch information
MDCYT authored Oct 10, 2022
2 parents 5123672 + 734d19d commit 4766909
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name":"guilded-bot",
"version":"1.1.0",
"version":"1.1.1",
"description":"A library for interacting with the Guilded API for your Guilded Bot",
"main":"src/index.js",
"scripts":{
Expand Down
4 changes: 3 additions & 1 deletion src/helper/messages.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
const { endpoints } = require("./endpoints");
const axios = require("axios");
const Message = require("../classes/structures/message");

/**
* Send a message to a selected channel
Expand Down Expand Up @@ -44,6 +43,7 @@ module.exports.sendMessage = async (MessageObject) => {
},
})
.then((res) => {
const Message = require("../classes/structures/message");
//Make a new message object
return new Message(res.data.message, MessageObject.client);
})
Expand Down Expand Up @@ -98,6 +98,7 @@ module.exports.editMessage = async (MessageObject) => {
},
})
.then((res) => {
const Message = require("../classes/structures/message");
//Make a new message object
return new Message(res.data.message, MessageObject.client);
})
Expand Down Expand Up @@ -132,6 +133,7 @@ module.exports.deleteMessage = async (MessageObject) => {
},
})
.then((res) => {
const Message = require("../classes/structures/message");
//Make a new message object
if (res.status === 204) {
return "Message deleted";
Expand Down

0 comments on commit 4766909

Please sign in to comment.