mirror of
https://github.com/System-End/Discord-Bot.git
synced 2026-04-19 16:28:26 +00:00
Chatbot optimimalization
This commit is contained in:
parent
e5a5e92032
commit
49af3f5117
1 changed files with 7 additions and 1 deletions
|
|
@ -13,6 +13,12 @@ const Commands = require("../../database/models/customCommand");
|
|||
const CommandsSchema = require("../../database/models/customCommandAdvanced");
|
||||
const fetch = require("node-fetch");
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {Discord.Client} client
|
||||
* @param {Discord.Message} message
|
||||
* @returns
|
||||
*/
|
||||
module.exports = async (client, message) => {
|
||||
const dmlog = new Discord.WebhookClient({
|
||||
id: client.webhooks.dmLogs.id,
|
||||
|
|
@ -254,7 +260,7 @@ module.exports = async (client, message) => {
|
|||
const input = message;
|
||||
try {
|
||||
fetch(
|
||||
`https://api.coreware.nl/fun/chat?msg=${encodeURIComponent(input)}`
|
||||
`https://api.coreware.nl/fun/chat?msg=${encodeURIComponent(input)}&uid=${message.author.id}`,
|
||||
)
|
||||
.catch(() => { console.log })
|
||||
.then((res) => res.json())
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue