How to use the sqlite.each function in sqlite

To help you get started, we’ve selected a few sqlite examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github invalidCards / WikiaLinker / wikilinker.js View on Github external
bc: (msg, [globalMessage]) => {
		if (!sentByBotAdmin(msg)) {
			msg.reply("you don't get to yell at everyone!");
		} else {
			sql.each('SELECT * FROM guilds', (err, row) => {
				if (row.broadcastChannel && !err) {
					if (row.broadcastChannel !== '-1') {
						bot.channels.get(row.broadcastChannel).send(globalMessage);
					}
				} else if (bot.guilds.has(row.id)) {
					defaultChannel(bot.guilds.get(row.id)).then(channel => {
						channel.send(globalMessage);
					});
				}
			}).catch(console.error);
		}
	},
	swiki: (msg, [wiki]) => {

sqlite

SQLite client for Node.js applications with SQL-based migrations API written in Typescript

MIT
Latest version published 1 year ago

Package Health Score

65 / 100
Full package analysis