Manish
Manish
SIASapphire - Imagine a framework
Created by Manish on 1/18/2024 in #sapphire-support
How to use sapphire framework decoraters plugin
Ok let me try.
49 replies
SIASapphire - Imagine a framework
Created by Manish on 1/18/2024 in #sapphire-support
How to use sapphire framework decoraters plugin
Thanks, this is fixed. Do you have any examples for a basic command which takes arguments? The example present in the docs for the ping command doesn't take any arguments. I want to make a play command for my bot which takes a query as a required argument. I earlier used discord.py, so I have no idea how to do it in discord.js.
49 replies
SIASapphire - Imagine a framework
Created by Manish on 1/18/2024 in #sapphire-support
How to use sapphire framework decoraters plugin
<:humanity_cutepika:1152474497878851676>
49 replies
SIASapphire - Imagine a framework
Created by Manish on 1/18/2024 in #sapphire-support
How to use sapphire framework decoraters plugin
import { Listener , Events , container } from "@sapphire/framework";
import { ApplyOptions } from "@sapphire/decorators";
import { MoonlinkNode } from "moonlink.js";

export class NodeConnectEvent extends Listener {
public constructor(context : Listener.LoaderContext , options: Listener.Options){
super(context , {
...options,
emitter : container.client.moon,
event: 'nodeCreate',
})
}
public run(node : MoonlinkNode) {
container.client.logger.info(`Node with ${node.identifier} is connected `)
}
}
import { Listener , Events , container } from "@sapphire/framework";
import { ApplyOptions } from "@sapphire/decorators";
import { MoonlinkNode } from "moonlink.js";

export class NodeConnectEvent extends Listener {
public constructor(context : Listener.LoaderContext , options: Listener.Options){
super(context , {
...options,
emitter : container.client.moon,
event: 'nodeCreate',
})
}
public run(node : MoonlinkNode) {
container.client.logger.info(`Node with ${node.identifier} is connected `)
}
}
PS C:\Users\Administrator\Documents\GitHub\Dart-Music> tsc
src/listeners/moonlink/nodeCreate.ts:9:40 - error TS2339: Property 'moon' does not exist on type 'SapphireClient<boolean>'.

9 emitter : container.client.moon,
~~~~


Found 1 error in src/listeners/moonlink/nodeCreate.ts:9
PS C:\Users\Administrator\Documents\GitHub\Dart-Music> tsc
src/listeners/moonlink/nodeCreate.ts:9:40 - error TS2339: Property 'moon' does not exist on type 'SapphireClient<boolean>'.

9 emitter : container.client.moon,
~~~~


Found 1 error in src/listeners/moonlink/nodeCreate.ts:9
I tried but getting this error
49 replies
SIASapphire - Imagine a framework
Created by Manish on 1/18/2024 in #sapphire-support
How to use sapphire framework decoraters plugin
<:humanity_cutepika:1152474497878851676>
49 replies
SIASapphire - Imagine a framework
Created by Manish on 1/18/2024 in #sapphire-support
How to use sapphire framework decoraters plugin
sorry I forgot to turn off mention .
49 replies
SIASapphire - Imagine a framework
Created by Manish on 1/18/2024 in #sapphire-support
How to use sapphire framework decoraters plugin
now how to access it in other files
49 replies
SIASapphire - Imagine a framework
Created by Manish on 1/18/2024 in #sapphire-support
How to use sapphire framework decoraters plugin
I assigned moonlinkManager to the client .
49 replies
SIASapphire - Imagine a framework
Created by Manish on 1/18/2024 in #sapphire-support
How to use sapphire framework decoraters plugin
export class Dart extends SapphireClient {
public moon : MoonlinkManager;
public constructor() {

super( {
intents: [
"Guilds",
"GuildMessages",
"GuildVoiceStates",
"GuildMembers",
"MessageContent",
"GuildEmojisAndStickers"
],
caseInsensitiveCommands: true,
caseInsensitivePrefixes:true,
defaultPrefix: BOT_PREFIX,
shards:'auto',
logger:{'level': LogLevel.Info},
presence : {'status':'idle',activities:[{'type':ActivityType.Listening ,'name':`/help`}]},
loadMessageCommandListeners:true,
allowedMentions : {'parse':['users'],repliedUser:true},





})
this.moon = new MoonlinkManager([{'host':'78.46.65.243','identifier':'optiklink','password':'manish2004',port:3965 ,'secure':false}] , {'movePlayersToNextNode':true , 'WebSocketDebug':false , 'autoResume':true}, (guild :any , sPayload:any) => {this.guilds.cache.get(guild)?.shard.send(JSON.parse(sPayload))})
}
public override login(token?: string): Promise<string> {
ApplicationCommandRegistries.setDefaultBehaviorWhenNotIdentical(RegisterBehavior.BulkOverwrite);

return super.login(token);

}


}
export class Dart extends SapphireClient {
public moon : MoonlinkManager;
public constructor() {

super( {
intents: [
"Guilds",
"GuildMessages",
"GuildVoiceStates",
"GuildMembers",
"MessageContent",
"GuildEmojisAndStickers"
],
caseInsensitiveCommands: true,
caseInsensitivePrefixes:true,
defaultPrefix: BOT_PREFIX,
shards:'auto',
logger:{'level': LogLevel.Info},
presence : {'status':'idle',activities:[{'type':ActivityType.Listening ,'name':`/help`}]},
loadMessageCommandListeners:true,
allowedMentions : {'parse':['users'],repliedUser:true},





})
this.moon = new MoonlinkManager([{'host':'78.46.65.243','identifier':'optiklink','password':'manish2004',port:3965 ,'secure':false}] , {'movePlayersToNextNode':true , 'WebSocketDebug':false , 'autoResume':true}, (guild :any , sPayload:any) => {this.guilds.cache.get(guild)?.shard.send(JSON.parse(sPayload))})
}
public override login(token?: string): Promise<string> {
ApplicationCommandRegistries.setDefaultBehaviorWhenNotIdentical(RegisterBehavior.BulkOverwrite);

return super.login(token);

}


}
49 replies
SIASapphire - Imagine a framework
Created by Manish on 1/18/2024 in #sapphire-support
How to use sapphire framework decoraters plugin
<:humanity_cutepika:1152474497878851676>
49 replies
SIASapphire - Imagine a framework
Created by Manish on 1/18/2024 in #sapphire-support
How to use sapphire framework decoraters plugin
ok so I have to create a messagecreate to add dokdo .
49 replies
SIASapphire - Imagine a framework
Created by Manish on 1/18/2024 in #sapphire-support
How to use sapphire framework decoraters plugin
49 replies
SIASapphire - Imagine a framework
Created by Manish on 1/18/2024 in #sapphire-support
How to use sapphire framework decoraters plugin
ohh nice . Can I use dokdo with sapphire ?
49 replies
SIASapphire - Imagine a framework
Created by Manish on 1/18/2024 in #sapphire-support
How to use sapphire framework decoraters plugin
thanks it worked now
49 replies