mirror of
https://github.com/danbulant/Shasha
synced 2026-05-25 04:41:51 +00:00
Split message not working
This commit is contained in:
parent
4df8b51463
commit
d23505a338
1 changed files with 4 additions and 4 deletions
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
const { MessageEmbed, Message, GuildMember, User, Client, GuildChannel, Role } = require('discord.js');
|
||||
const { MessageEmbed, Message, GuildMember, User, Client, GuildChannel, Role, MessageOptions } = require('discord.js');
|
||||
const { defaultErrorLogChannel } = require("../config.json");
|
||||
const { database } = require("../database/mongo");
|
||||
|
||||
|
|
@ -204,10 +204,10 @@ function noPerm(msg) {
|
|||
* Send message
|
||||
* @param {Client} client - (this.client)
|
||||
* @param {Message | String} msg Message object | channel_ID
|
||||
* @param {...any} content - ({content:content,optionblabla})
|
||||
* @param {MessageOptions} content - ({content:content,optionblabla})
|
||||
* @returns {Promise<Message>} Sent message object
|
||||
*/
|
||||
async function trySend(client, msg, ...content) {
|
||||
async function trySend(client, msg, content) {
|
||||
//console.log(...content);
|
||||
let msgOf;
|
||||
if (msg?.channel) {
|
||||
|
|
@ -215,7 +215,7 @@ async function trySend(client, msg, ...content) {
|
|||
} else {
|
||||
msgOf = client.channels.cache.get(msg);
|
||||
}
|
||||
const sentMes = await msgOf.send(...content)
|
||||
const sentMes = await msgOf.send(content)
|
||||
.catch(() => {
|
||||
if (msg?.channel) {
|
||||
noPerm(msg);
|
||||
|
|
|
|||
Loading…
Reference in a new issue