Giter VIP home page Giter VIP logo

Comments (6)

LuckyYam avatar LuckyYam commented on August 11, 2024
export interface ICommand {
	client?: WAClient;
	handler?: MessageHandler;
	run(
		M: ISimplifiedMessage,
		parsedArgs: IParsedArgs
	): Promise<void | never> | void | never;
	config: {
		adminOnly?: boolean;
		aliases?: string[];
		description?: string;
		command: string;
		id?: string;
		category?: TCategory;
		usage?: string;
		dm?: boolean;
		baseXp?: number;
		modsOnly?: boolean;
	};
}

You can check it here

from chitoge.

AliAryanTech avatar AliAryanTech commented on August 11, 2024

Screenshot_20220324-233107
Just tell me how to make this command available for admins and mods both!!
Like if there's a admin but it's not mod then he can use it also if there's a mod but not group admin he can also use that command

from chitoge.

LuckyYam avatar LuckyYam commented on August 11, 2024

Screenshot_20220324-233107 Just tell me how to make this command available for admins and mods both!! Like if there's a admin but it's not mod then he can use it also if there's a mod but not group admin he can also use that command

Unfortunately there isn't a config for that. But you can one like this -

if (!this.client.config.mods.includes(M.sender.jid) && !M.sender.isAdmin) 
      return void M.reply("You can't use this command")

I hope this clears your issue

from chitoge.

AliAryanTech avatar AliAryanTech commented on August 11, 2024

Screenshot_20220324-233107 Just tell me how to make this command available for admins and mods both!! Like if there's a admin but it's not mod then he can use it also if there's a mod but not group admin he can also use that command

Unfortunately there isn't a config for that. But you can one like this -

if (!this.client.config.mods.includes(M.sender.jid) && !M.sender.isAdmin) 
      return void M.reply("You can't use this command")

I hope this clears your issue

You didn't tell me where I need to paste it
So, it's possible I do a mistake

from chitoge.

LuckyYam avatar LuckyYam commented on August 11, 2024

I think this is what you're looking for

from chitoge.

AliAryanTech avatar AliAryanTech commented on August 11, 2024

I think this is what you're looking for

Haha 🙄
Nice, Joke!!

Now tell me where I put that code in This Command

from chitoge.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.