Socket
Socket
Sign inDemoInstall

button-mod

Package Overview
Dependencies
8
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    button-mod

A fun npm package to play games within Discord with buttons!


Version published
Weekly downloads
17
decreased by-46.87%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

Weky


What is weky?

  • A fun npm package to play games within Discord with buttons!
  • looking for examples? click here: Examples

Features

  • 🧑 Beginner friendly
  • 🎉 Easy to use
  • ✨ Simple
  • 🔘 Discord Buttons
  • and much more!

Install the package 📥

npm install weky

Usage 📚

const { Calculator } = require("weky");
await Calculator({
    message: message,
    embed: {
        title: 'Calculator | Weky Development',
        color: '#7289da',
        footer: '©️ Weky Development',
        timestamp: true
    },
    disabledQuery: 'Calculator is disabled!',
    invalidQuery: 'The provided equation is invalid!',
    othersMessage: 'Only <@{{author}}> can use the buttons!'
});

Example ✏️

Discord.js v12.5.3
const Discord = require('discord.js');
require('@weky/inlinereply');
const client = new Discord.Client();
const disbut = require('discord-buttons');
const { Calculator } = require('weky');
disbut(client);

client.on('ready', async () => {
	console.log(`Logged in as ${client.user.tag}`);
});

client.on('message', async (message) => {
	if(message.content === '!calculator') {
		await Calculator({
			message: message,
			embed: {
				title: 'Calculator | Weky Development',
				color: '#5865F2',
				footer: '©️ Weky Development',
				timestamp: true,
			},
			disabledQuery: 'Calculator is disabled!',
			invalidQuery: 'The provided equation is invalid!',
			othersMessage: 'Only <@{{author}}> can use the buttons!',
		});
	}
});

client.login('DISCORD_BOT_TOKEN');
Discord.js v12.5.3
const Discord = require('discord.js');
const client = new Discord.Client();
const { Calculator } = require('weky');

client.on('ready', async () => {
	console.log(`Logged in as ${client.user.tag}`);
});

client.on('messageCreate', async (message) => {
	if (message.content === '!calculator') {
		await Calculator({
			message: message,
			embed: {
				title: 'Calculator | Weky Development',
				color: '#5865F2',
				footer: '©️ Weky Development',
				timestamp: true,
			},
			disabledQuery: 'Calculator is disabled!',
			invalidQuery: 'The provided equation is invalid!',
			othersMessage: 'Only <@{{author}}> can use the buttons!',
		});
	}
});

client.login('DISCORD_BOT_TOKEN');

Result 📤

Contributing 🤝

  • Contributions, issues and feature requests are welcome!
  • Feel free to check issues page.

Developers 👨‍💻

Support ❔

Keywords

FAQs

Last updated on 06 Sep 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc