sedřetec
This commit is contained in:
parent
d8c9c24da8
commit
2e89310d2b
@ -136,16 +136,15 @@ const exp: Modul = {
|
||||
cas = Math.floor(Math.random() * 10740 + 60);
|
||||
}
|
||||
|
||||
const channel = await mes.author.createDM();
|
||||
try {
|
||||
await channel.send(`test ${emouty.d3k}`);
|
||||
await mes.author.send(`test ${emouty.d3k}`);
|
||||
} catch {
|
||||
return "ja ti ale napsat nemuzu ti kundo";
|
||||
}
|
||||
|
||||
setTimeout(async () => {
|
||||
for (let i = 0; i < 15; i++) {
|
||||
await channel.send("uz?");
|
||||
await mes.author.send("uz?");
|
||||
}
|
||||
}, cas * 1000);
|
||||
|
||||
|
||||
@ -236,9 +236,7 @@ const exp: Modul = {
|
||||
if (mes.channel.type == ChannelType.DM) return mes.channel.send("drz hubu");
|
||||
|
||||
mes.delete();
|
||||
(async () => {
|
||||
sendDM(mes.author, "spis tak nepis");
|
||||
})();
|
||||
return true;
|
||||
}
|
||||
},
|
||||
|
||||
@ -246,6 +246,5 @@ export const statusOnFoun = (bef: FakePresence | null, aft: FakePresence) => {
|
||||
export const getGuildConnection = (guildId: string) => pripojeni[guildId]?.connection;
|
||||
|
||||
export async function sendDM(user: User, txt: string) {
|
||||
const channel = await user.createDM();
|
||||
channel.send(txt).catch(() => console.log(`dementovi ${user} nejde poslat DM`));
|
||||
user.send(txt).catch(() => console.log(`dementovi ${user} nejde poslat DM`));
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user