SureDroid
06/12/2020, 2:50 AMSureDroid
06/12/2020, 3:09 AM@Command({
description: "Replies '!hi' with hello."
}) // Note: Name is taken from method name
async hi({msg}: MsgData) {
await msg.reply("hello");
}
I need to store the command description, name, etc in a database. And I need to figure out a way to give the hi command an id. If only there was an @id decorator that gave the command the same id every time.Ryan
06/12/2020, 7:09 AMHow does the schema work? Do you write a schema in prisma and does prisma create it if it doesn't exist?Yes you define a schema in a file named
schema.prisma
and yes Prisma does create it as explained here.
Is it possible to have the same id for certain node objects? I'll explain more about this question in the thread.I think you would have to write this logic by yourself by checking if the commands are same and provide the id.