mirror of
https://github.com/System-End/Discord-Bot.git
synced 2026-04-19 20:55:16 +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 CommandsSchema = require("../../database/models/customCommandAdvanced");
|
||||||
const fetch = require("node-fetch");
|
const fetch = require("node-fetch");
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param {Discord.Client} client
|
||||||
|
* @param {Discord.Message} message
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
module.exports = async (client, message) => {
|
module.exports = async (client, message) => {
|
||||||
const dmlog = new Discord.WebhookClient({
|
const dmlog = new Discord.WebhookClient({
|
||||||
id: client.webhooks.dmLogs.id,
|
id: client.webhooks.dmLogs.id,
|
||||||
|
|
@ -254,7 +260,7 @@ module.exports = async (client, message) => {
|
||||||
const input = message;
|
const input = message;
|
||||||
try {
|
try {
|
||||||
fetch(
|
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 })
|
.catch(() => { console.log })
|
||||||
.then((res) => res.json())
|
.then((res) => res.json())
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue