This commit is contained in:
26
commands/tests/test.ts
Normal file
26
commands/tests/test.ts
Normal file
@@ -0,0 +1,26 @@
|
||||
/* DEPRECATED
|
||||
|
||||
import {CommandInteraction} from 'discord.js';
|
||||
import {Command} from '../../classes/command';
|
||||
import {logger} from '../../logger';
|
||||
import {getAllContest, getAllProblem, getAllSession} from '../../functions/database';
|
||||
|
||||
class Test extends Command{
|
||||
get name(){return "test";}
|
||||
get description(){return "Testing some features.";}
|
||||
async execute(interaction: CommandInteraction): Promise<void>{
|
||||
try{
|
||||
console.log(await getAllContest());
|
||||
console.log(await getAllProblem());
|
||||
console.log(await getAllSession());
|
||||
interaction.reply({
|
||||
content: `test ok`
|
||||
});
|
||||
}catch(error: unknown){
|
||||
logger.error(`error get all contests`);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const command = new Test();
|
||||
*/
|
||||
Reference in New Issue
Block a user