Package Exports
- discord-birthday-wisher
- discord-birthday-wisher/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (discord-birthday-wisher) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
discord-birthday-wisher
- discord-birthday-wisher is a powerful npm package that wishes everyone a happy birthday on their birthday, uses MongoDB.
- If you need help feel free to join our discord server to talk and help you with your code.
- If you encounter any of those fell free to open an issue in our github repository.
Download & Update
You can download it from npm:
npm i discord-birthday-wisherYou can update to a newer version to receive updates using npm.
npm update discord-birthday-wisherChangelog
- 6 July 2022 (v1.1.0) - Grand Launch.
Quick Example
/* setBirthday Example */
const birthdays = require("discord-birthday-wisher");
// Sets the birthday for a user to 08/11/2005.
var myBirthday = birthdays.setBirthday(
"611107142560382976",
"753938142246994031",
"8",
"11",
"2005"
);
console.log(myBirthday.BirthdayDay); // Output: 8
console.log(myBirthday.BirthdayMonth); // Output: 11
console.log(myBirthday.BirthdayYear); // Output: 2005
console.log(myBirthday.BirthdayFull); // Output: 8/11/2005Setting Up
First things first, we include the module into the project.
const birthdays = require("discord-birthday-wisher");After that, you need to provide a valid mongo database url, and set it. You can do so by:
birthdays.setURL("mongodb://..."); // You only need to do this ONCE per process.Examples
Examples can be found in /test
Methods
setBirthday
Creates an entry in database for that birthday if it doesnt exist.
birthdays.setBirthday(<UserID - String>, <GuildID - String>, <BirthdayDay - Number> , BirthdayMonth - Number>, <BirthdayYear - Number>);- Output:
Promise<Object>deleteBirthday
If the birthday exists, deletes it from the database.
birthdays.deleteBirthday(<UserID - String>, <GuildID - String>);- Output:
Promise<Object>changeBirthday
If the birthday exists, changes it from the database.
birthdays.changeBirthday(<UserID - String>, <GuildID - String>, <BirthdayDay - Number> , BirthdayMonth - Number>, <BirthdayYear - Number>);- Output:
Promise<Object>Have fun and happy birthdays! Made with ❤ by Abdelrahman.

