Skip to content

Commit 5576a27

Browse files
committed
Add in console.logs
1 parent 8e11439 commit 5576a27

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

dist/main.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,20 @@ Canister.on("message", (message) => __awaiter(this, void 0, void 0, function* ()
2222
const matched = message.content.match(/^!poll\s+?(.+)\s+?(\d)/i);
2323
console.log(message.content);
2424
if (matched && matched.index !== -1) {
25+
console.log("matchec command!! :OOO SCREAMS");
2526
const pollQuestion = matched[1];
2627
const pollTimeout = parseInt(matched[2], 10);
2728
const embedOptions = {
2829
title: pollQuestion,
2930
};
3031
const embed = new discord_js_1.RichEmbed(embedOptions);
32+
console.log("Trying stuff now");
3133
try {
34+
console.log("SENDING POPCORN MESSAGES");
3235
const botMessage = yield message.channel.send("@everyone:", embed);
3336
const yesReaction = yield botMessage.react(THUMBS_UP);
3437
const noReaction = yield botMessage.react(THUMBS_DOWN);
38+
console.log("POP MESSAGES SENT");
3539
if (message.deletable) {
3640
message.delete();
3741
}
@@ -43,6 +47,7 @@ Canister.on("message", (message) => __awaiter(this, void 0, void 0, function* ()
4347
// setTimeout(() => {
4448
// botMessage.delete();
4549
// }, pollTimeout * 1000);
50+
console.log("TASK FINISHED");
4651
}
4752
catch (err) {
4853
console.error(err);

src/main.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,20 @@ Canister.on("message", async (message: Message) => {
1616
const matched = message.content.match(/^!poll\s+?(.+)\s+?(\d)/i);
1717
console.log(message.content);
1818
if (matched && matched.index !== -1) {
19+
console.log("matchec command!! :OOO SCREAMS");
1920
const pollQuestion: string = matched[1];
2021
const pollTimeout: number = parseInt(matched[2], 10);
2122
const embedOptions: RichEmbedOptions = {
2223
title: pollQuestion,
2324
};
2425
const embed: RichEmbed = new RichEmbed(embedOptions);
26+
console.log("Trying stuff now");
2527
try {
28+
console.log("SENDING POPCORN MESSAGES")
2629
const botMessage: Message = await message.channel.send("@everyone:", embed) as Message;
2730
const yesReaction: MessageReaction = await botMessage.react(THUMBS_UP);
2831
const noReaction: MessageReaction = await botMessage.react(THUMBS_DOWN);
32+
console.log("POP MESSAGES SENT");
2933
if (message.deletable) {
3034
message.delete();
3135
}
@@ -37,6 +41,7 @@ Canister.on("message", async (message: Message) => {
3741
// setTimeout(() => {
3842
// botMessage.delete();
3943
// }, pollTimeout * 1000);
44+
console.log("TASK FINISHED");
4045
} catch (err) {
4146
console.error(err);
4247
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy