Socket
Socket
Sign inDemoInstall

@hammerhq/plugin-sequelize

Package Overview
Dependencies
70
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @hammerhq/plugin-sequelize

😎 Sequelize Plugin for Hammer


Version published
Weekly downloads
1
Maintainers
1
Created
Weekly downloads
 

Readme

Source

Logo

Hammer Framework Sequelize Plugin

This plugin adds the ability to use sequelize to Hammer bots.
Get support »

Report Bug · Documentation

📦 Installation

Install main plugin

$ npm install @hammerhq/plugin-sequelize sequelize sequelize-typescript

Install one of the following database drivers:

$ npm install pg pg-hstore # Postgres
$ npm install mysql2 #MySQL
$ npm install mariadb #MariaDB
$ npm install sqlite3 #SQLite
$ npm install tedious # Microsoft SQL Server
$ npm install oracledb # Oracle Database

🚀 Usage

import { bootstrap } from "@hammerhq/core";
import { SequelizeModule } from "@hammerhq/plugin-sequelize";
import { Client } from "discord.js";
import { join } from "path";

const client = new Client(ClientOptions);

async function main() {
	await bootstrap({
		client,
		i18n: {
			defaultLocale: "en", // default locale, see @hammerhq/localization
			directory: join(__dirname, "..", "locales"), // locales directory, see @hammerhq/localization
		},
		plugins: [
			// hammer plugins here. You can download them with hammer cli, from npm and create your own!
			SequelizeModule.forRoot({
				dialect: "sqlite", // your database driver like sqlite, postgres, mysql, etc.
				storage: ":memory:",
				models: [], // your models here, to create a model please refer to https://www.npmjs.com/package/sequelize-typescript#model-definition
			}),
		],
	});

	await client.login(CONFIG.BOT_TOKEN);
}

main();

🧦 Looking For Contributors

We are looking for contributors to actively work on Hammer and to contribute to the repos. There is still lots of work to do. If you are interested in contributing, please join our Discord server. (There will be a surprise for early contributors!)

🔑 License

Copyright © 2022 Barış DEMİRCİ.

Distributed under the GPL-3.0 License. See LICENSE for more information.

🧦 Contributing

This repo is open for #hacktoberfest. Feel free to use GitHub's features.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/my-feature)
  3. Run prettier (npm run format)
  4. Commit your Changes (git commit -m 'my awesome feature my-feature')
  5. Push to the Branch (git push origin feature/my-feature)
  6. Open a Pull Request

⭐️ Show your support

Give a ⭐️ if this project helped you!

☎️ Contact

Keywords

FAQs

Last updated on 26 Nov 2023

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