Skip to content

Commit

Permalink
update example
Browse files Browse the repository at this point in the history
  • Loading branch information
catplvsplus committed May 30, 2024
1 parent 4674784 commit 712250d
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 124 deletions.
1 change: 0 additions & 1 deletion example/modules/Commands/Avatar.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { ContextMenuCommandBuilder } from "reciple";
* @type {import("reciple").RecipleModuleData}
*/
export default {
versions: '^9',
commands: [
new ContextMenuCommandBuilder()
.setName('Avatar')
Expand Down
1 change: 0 additions & 1 deletion example/modules/Commands/Ping.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { MessageCommandBuilder } from 'reciple';
* @type {import('reciple').RecipleModuleData}
*/
export default {
versions: ['^9'],
commands: [
new MessageCommandBuilder()
.setName('ping')
Expand Down
1 change: 0 additions & 1 deletion example/modules/Commands/Say.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { SlashCommandBuilder } from 'reciple';
* @type {import('reciple').RecipleModuleData}
*/
export default {
versions: ['^9'],
commands: [
new SlashCommandBuilder()
.setName('say')
Expand Down
115 changes: 0 additions & 115 deletions example/modules/Examples/AddCommandHalts.js

This file was deleted.

11 changes: 5 additions & 6 deletions example/modules/Examples/CustomLogger.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
* @satisfies {import("reciple").RecipleModuleData}
*/
export default {
versions: '^9',
/**
* @type {import("reciple").Logger|undefined}
*/
Expand All @@ -16,16 +15,16 @@ export default {
* @param {import("reciple").RecipleModuleStartData} param0
*/
onStart({ client }) {
this.logger = client.logger.clone({ name: 'My Logger' });
this.logger = client.logger?.clone({ name: 'My Logger' });
return true;
},
/**
* @param {import("reciple").RecipleModuleLoadData} param0
*/
onLoad({ client }) {
this.logger.log(`A log message`); // Logger#info is synonymous to Logger#log
this.logger.warning(`A warning message`); // Logger#warn is synonymous to Logger#warning
this.logger.error(`An error message`); // Logger#err is synonymous to Logger#error
this.logger.debug(`A debug message`); // Debug messages are shown when debug mode is enabled
this.logger?.log(`A log message`); // Logger#info is synonymous to Logger#log
this.logger?.warning(`A warning message`); // Logger#warn is synonymous to Logger#warning
this.logger?.error(`An error message`); // Logger#err is synonymous to Logger#error
this.logger?.debug(`A debug message`); // Debug messages are shown when debug mode is enabled
}
};

0 comments on commit 712250d

Please sign in to comment.