Skip to content

Commit

Permalink
Feature Testing script fix
Browse files Browse the repository at this point in the history
  • Loading branch information
pakkographic committed Aug 12, 2024
1 parent cfb87a9 commit 4c63e47
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 23 deletions.
1 change: 0 additions & 1 deletion lib/structures/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,6 @@ export class Client extends TypedEmitter<ClientEvents> {
return;
}


/** Connect to Guilded. */
connect(): void {
void this.checkForUpdate();
Expand Down
20 changes: 10 additions & 10 deletions scripts/tests/channel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ const client = new Client({ token: process.env.TOKEN as string });

client.on("ready", async () => {
console.log(`Logged as ${client.user?.username}`);
let chat = await client.createChannel("NEa5J8GE", "PIZZANANAS", "chat", { description: "We love Pizza 🍕" });
let announcement = await client.createChannel("NEa5J8GE", "PIZZANANAS", "announcements", { description: "We love Pizza 🍕" });
let calendar = await client.createChannel("NEa5J8GE", "PIZZANANAS", "calendar", { description: "We love Pizza 🍕" });
let forums = await client.createChannel("NEa5J8GE", "PIZZANANAS", "forums", { description: "We love Pizza 🍕" });
let media = await client.createChannel("NEa5J8GE", "PIZZANANAS", "media", { description: "We love Pizza 🍕" });
let voice = await client.createChannel("NEa5J8GE", "PIZZANANAS", "voice", { description: "We love Pizza 🍕" });
let docs = await client.createChannel("NEa5J8GE", "PIZZANANAS", "docs", { description: "We love Pizza 🍕" });
let list = await client.createChannel("NEa5J8GE", "PIZZANANAS", "list", { description: "We love Pizza 🍕" });
let scheduling = await client.createChannel("NEa5J8GE", "PIZZANANAS", "scheduling", { description: "We love Pizza 🍕" });
let stream = await client.createChannel("NEa5J8GE", "PIZZANANAS", "stream", { description: "We love Pizza 🍕" });
let chat = await client.rest.guilds.createChannel("NEa5J8GE", "PIZZANANAS", "chat", { description: "We love Pizza 🍕" });
let announcement = await client.rest.guilds.createChannel("NEa5J8GE", "PIZZANANAS", "announcements", { description: "We love Pizza 🍕" });
let calendar = await client.rest.guilds.createChannel("NEa5J8GE", "PIZZANANAS", "calendar", { description: "We love Pizza 🍕" });
let forums = await client.rest.guilds.createChannel("NEa5J8GE", "PIZZANANAS", "forums", { description: "We love Pizza 🍕" });
let media = await client.rest.guilds.createChannel("NEa5J8GE", "PIZZANANAS", "media", { description: "We love Pizza 🍕" });
let voice = await client.rest.guilds.createChannel("NEa5J8GE", "PIZZANANAS", "voice", { description: "We love Pizza 🍕" });
let docs = await client.rest.guilds.createChannel("NEa5J8GE", "PIZZANANAS", "docs", { description: "We love Pizza 🍕" });
let list = await client.rest.guilds.createChannel("NEa5J8GE", "PIZZANANAS", "list", { description: "We love Pizza 🍕" });
let scheduling = await client.rest.guilds.createChannel("NEa5J8GE", "PIZZANANAS", "scheduling", { description: "We love Pizza 🍕" });
let stream = await client.rest.guilds.createChannel("NEa5J8GE", "PIZZANANAS", "stream", { description: "We love Pizza 🍕" });
console.log("📧 The Channels were created")
await chat.edit({ description: "We love Pizza 🍕\nWith Nutella", isPublic: true, name:"P-I-Z-Z-A" });
await announcement.edit({ description: "We love Pizza 🍕\nWith Nutella", isPublic: true, name:"P-I-Z-Z-A" });
Expand Down
24 changes: 12 additions & 12 deletions scripts/tests/message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const client = new Client({ token: process.env.TOKEN as string});
client.on("ready", async () => {
console.log(`Logged as ${client.user?.username}`);
console.log("📧 Sending Message")
let message = await client.createMessage("74a7bc35-21ea-465d-9554-c82ccba067b7", { content: "We love Pizza 🍕" });
let message = await client.rest.channels.createMessage("74a7bc35-21ea-465d-9554-c82ccba067b7", { content: "We love Pizza 🍕" });
console.log("📧 The Message was sent")
await message.pin();
console.log("📌 The Message was pinned")
Expand All @@ -31,7 +31,7 @@ client.on("ready", async () => {
await message.createReaction(90002552)
await message.createReaction(90002583)
console.log("👍 The Reactions were created")
await client.bulkDeleteReactions(message.channelID, "ChannelMessage", message.id)
await client.rest.channels.bulkDeleteReactions(message.channelID, "ChannelMessage", message.id)
console.log("👍 The Reactions were deleted")
await message.delete();
console.log("🗑️ The Message was deleted")
Expand All @@ -40,9 +40,9 @@ client.on("ready", async () => {
if (cache) console.log("✅ The Message was cached")
console.log("--------------------")
console.log("📧 Sending Announcement")
let announcement = await client.createAnnouncement("4a922fbf-f009-4db9-b017-bfff2ac22944", {title: "Pizza",content: "We love Pizza 🍕",});
let announcement = await client.rest.channels.createAnnouncement("4a922fbf-f009-4db9-b017-bfff2ac22944", {title: "Pizza",content: "We love Pizza 🍕",});
console.log("📧 The Announcement was sent")
let comment = await client.createAnnouncementComment(announcement.channelID, announcement.id, {content: "With Pineapple"});
let comment = await client.rest.channels.createAnnouncementComment(announcement.channelID, announcement.id, {content: "With Pineapple"});
console.log("📧 The Announcement Comment was sent")
await announcement.createReaction(90002573)
console.log("👍 The Reaction was created")
Expand All @@ -57,7 +57,7 @@ client.on("ready", async () => {
console.log("🗑️ The Announcement was deleted")
console.log("--------------------")
console.log("📧 Sending Calendar Event")
let event = await client.createCalendarEvent("76adcbea-ed87-47f2-8225-f6396613eeb4", {
let event = await client.rest.channels.createCalendarEvent("76adcbea-ed87-47f2-8225-f6396613eeb4", {
name: "Pizza Party",
description: "We love Pizza 🍕",
color: 0xFFE933,
Expand All @@ -70,7 +70,7 @@ client.on("ready", async () => {
url: "https://www.google.com/search?q=pizza",
});
console.log("📧 The Calendar Event was created")
let Comment = await client.createCalendarComment(event.channelID, event.id, {content: "With Pineapple it's better"});
let Comment = await client.rest.channels.createCalendarComment(event.channelID, event.id, {content: "With Pineapple it's better"});
console.log("📧 The Calendar Comment was sent")
await Comment.createReaction(90002573)
console.log("👍 The Reaction was created")
Expand All @@ -96,9 +96,9 @@ client.on("ready", async () => {
console.log("🗑️ The Calendar Event was deleted")
console.log("--------------------")
console.log("📧 Sending Docs")
let doc = await client.createDoc("a7bca3fe-d04e-4fc4-9967-cdc53d154d80", {"title":"The 5 Reasons Why You Should Eat Pizza (The 6th Will Shock You)","content":"So, this is the 5 reasons why you should eat pizza:\n1 » It's good\n2» It's good\n3» It's good\n4» It's good\n5» It's good"});
let doc = await client.rest.channels.createDoc("a7bca3fe-d04e-4fc4-9967-cdc53d154d80", {"title":"The 5 Reasons Why You Should Eat Pizza (The 6th Will Shock You)","content":"So, this is the 5 reasons why you should eat pizza:\n1 » It's good\n2» It's good\n3» It's good\n4» It's good\n5» It's good"});
console.log("📧 The Doc was sent")
let CommentDoc = await client.createDocComment(doc.channelID, doc.id, {content: "With Pineapple it's better"});
let CommentDoc = await client.rest.channels.createDocComment(doc.channelID, doc.id, {content: "With Pineapple it's better"});
console.log("📧 The Doc Comment was sent")
await CommentDoc.createReaction(90002573)
console.log("👍 The Reaction was created")
Expand All @@ -113,9 +113,9 @@ client.on("ready", async () => {
console.log("🗑️ The Doc was deleted")
console.log("--------------------")
console.log("📧 Sending Forum Topic")
let Thread = await client.createForumThread("478dcf19-fe2f-4fae-b7ee-c54d50ec9bee", {title: "Pizza",content: "We love Pizza 🍕",});
let Thread = await client.rest.channels.createForumThread("478dcf19-fe2f-4fae-b7ee-c54d50ec9bee", {title: "Pizza",content: "We love Pizza 🍕",});
console.log("📧 The Forum Thread was sent")
let CommentThread = await client.createForumComment(Thread.channelID, Thread.id, {content: "With Pineapple it's better"});
let CommentThread = await client.rest.channels.createForumComment(Thread.channelID, Thread.id, {content: "With Pineapple it's better"});
console.log("📧 The Forum Comment was sent")
await CommentThread.createReaction(90002573)
console.log("👍 The Reaction was created")
Expand All @@ -130,9 +130,9 @@ client.on("ready", async () => {
console.log("🗑️ The Forum Thread was deleted")
console.log("--------------------")
console.log("📧 Sending List Item")
let Item = await client.createListItem("df5a00d1-709e-4b6c-b918-eddfdb1035f5", "Eat some Pizza", {content:"With Pineapple it's better",});
let Item = await client.rest.channels.createListItem("df5a00d1-709e-4b6c-b918-eddfdb1035f5", "Eat some Pizza", {content:"With Pineapple it's better",});
console.log("📧 The List Item was sent")
await client.completeListItem(Item.channelID, Item.id);
await client.rest.channels.completeListItem(Item.channelID, Item.id);
console.log("📧 The List Item was completed")
await Item.edit({content: "With Nutella" });
console.log("✏️ The List Item was edited")
Expand Down

0 comments on commit 4c63e47

Please sign in to comment.