Skip to content

Reminder [Aoi.js]

The Arcwise Domain

This will show you Code & Explanation of how it works!

Code

index.js - Variables

client.variables({
author: "",
title: ""
})

variables.js - Variables Requires require("./variables.js")(client); in index.js

module.exports = (client) => {
client.variables({
author: "",
title: ""
}, "main");
};

index.js - Timeout Command (You can only do Timeout commands in Index.js)

client.timeoutCommand({
name: "reminder",
code: `
$channelSendMessage[1152634368796393502;<@$getVar[author]> Time's up! Time's up! Don't forget about $getVar[title]!!]
$wait[2s]
$channelSendMessage[1152634368796393502;<@$getVar[author]> Time's up! Time's up! Don't forget about $getVar[title]!!]`
})

reminder.js

module.exports =[{
name: "reminder",
code: `
$description[Hello $username, what do you want me to remind you about?]
$color[Yellow]
$addButton[1;Set Reminder;secondary;setreminder;false]`
},
{
name: "setreminder",
type: 'interaction',
prototype: 'button',
code: `
$interactionModal[New Reminder;reminderid;
{actionRow:
{textInput: Title of Reminder:2:title:false::1:100}}
{actionRow:
{textInput: Time?:1:time:false::1:3}}]
$setVar[author;$authorID]`
},
{
name: "reminderid",
type: 'interaction',
prototype: 'modal',
code: `
$interactionReply[Thanks $username[$getVar[author]], I will remind you about \`$textInputValue[title]\` in \`$textInputValue[time]\`]
$setVar[title;$textInputValue[title]]
$setTimeout[reminder;$textInputValue[time];{};false]`
}]

Explanation

  • This section will try its best to explain how each code works above, things you should know.

Reminder Command

How do I execute it?

  • [prefix]reminder

How does it work?

  • First Bot greets you, and offers you a Button which when you click asks for “Title of Reminder (Thing you want to be reminded about)” and “Time (When should it remind you? Ex. setting “5s” will remind you in 5s)
  • After you click Input required information a Timeout will be created, lets go to next section for it.

Timeout Command

How do I execute it?

  • You execute it when you make an Reminder.

How does it work?

  • After you have set an Reminder, the command will execute when time passes, if you have set reminder to “5s” it will wait 5s and remind you. When an reminder reaches Time it will send a Message containing “Time’s UP! Time’s UP! Don’t forget about [thing]”, it will be sent twice in a Specific Channel!

End

  • Thanks to anyone who is still Following me on Youtube Channel and actually uses codes I make, appreciate that!
  • Hope you liked this Reminder in Aoi.js!

Credits

JosipFX - Made Code & Video