A chat logs online saver for discord bots to save messages history & cleared messages online

Overview

Chat Logs

Chat Logs NPM Package Statistics
  • NPM package that saves messages online to view it later
  • Useful for bots where users can save messages history & cleared messages online
  • Supports the Promise-API, you will be able to use .then, .catch, etc...

Example Picture

Example Picture

Check out or website Chat Logs.

Installation from NPM

npm i logs.chat

Usage

  • create(messages) - Saves chat messages online
    • messages: (REQUIRED) Array of messages

it will return an object looks like this:

{
	"url": "https://logs.chat/chat/1",
	"code": 1
}

Example

const chat = require('logs.chat');
const Discord = require('discord.js');
const client = new Discord.Client({
	"intents": [
		"GUILDS",
		"GUILD_MESSAGES"
	]
});
const prefix = '!';

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

client.on('messageCreate', async message => {
	if (!message.content.startsWith(prefix) || message.author.bot) return;

	const args = message.content.slice(prefix.length).trim().split(/ +/);
	const command = args.shift().toLowerCase();

	if (command === 'save') {
		let messages = await message.channel.messages.fetch();
		let chat = await chat.create(messages);
		let embed = new Discord.MessageEmbed()
			.setTitle(`Chat Created with ${messages.size} messages`)
			.setColor("#7289DA")
			.setThumbnail(message.guild.iconURL({dynamic:true}))
			.setDescription(`[View Chat Online](${chat.url})`)
			.addField("Channel", message.channel, true)
			.addField("Chat Code", chat.code, true)
		message.channel.send({embeds: [embed]});
		await message.delete();
	}
});

client.login("TOKEN")

Contributing

© Chat Logs, 2021 - 2022 | TARIQ ([email protected])

You might also like...

Chat View let's you quickly and easily create elegant Chat UIs in your Markdown Files.

Chat View let's you quickly and easily create elegant Chat UIs in your Markdown Files.

Obsidian Chat View Plugin Chat View let's you quickly and easily create elegant Chat UIs in your Markdown Files. Usage Every chat message must be pref

Dec 27, 2022

Omnichannel Live Chat Widget UI Components offers a re-usable component-based library to help create a custom chat widget that can be connected to the Dynamics 365 Customer Service experience.

Omnichannel Live Chat Widget UI Components @microsoft/omnichannel-chat-widget is a React-based UI component library which allows you to build your own

Dec 15, 2022

Replaces Youtube Chat with Destiny.gg chat.

Replaces Youtube Chat with Destiny.gg chat.

A lightweight extension that replaces the native Youtube Live chat with an embeded destiny.gg chat. Note: This is in no way affiliated with Destiny.gg

Jul 27, 2022

The Chat'Inn is a simple and minimal realtime chat application whose database is powered by firebase and firestore.

The Chat-in The Chat'Inn is a simple and minimal realtime chat application whose database is powered by firebase and firestore. The frontend part is c

Aug 8, 2022

O Web-Chat é um projeto com o intuito de criar um chat de ajuda, que contém uma experiência dinâmica e salva as informações preenchidas pelo usuário usando um formulário.

O Web-Chat é um projeto com o intuito de criar um chat de ajuda, que contém uma experiência dinâmica e salva as informações preenchidas pelo usuário usando um formulário.

Web-Chat Introdução O Web-Chat é um projeto com o intuito de criar um chat de ajuda, que contém uma experiência dinâmica e salva as informações preenc

Oct 5, 2022

a full functional discord bot to send moomoo.io bots

MooMooBot a discord bot which does moomoo.io stuff commands !send server name ex: !send 8:0:0 Nuro !token (generates a token to test if there's n

Jun 1, 2022

A base for developing Discord.js bots, written in TypeScript.

A base for developing Discord.js bots, written in TypeScript.

Nyx is a Discord bot template written in Typescript, supporting most of Discord.js' features alongside tools useful for bot development. 🇪🇸 README e

Dec 15, 2022

Store data using zero width spaces! Might be useful for discord bots.

Store data using zero width spaces! Might be useful for discord bots.

ZWSP Store data using zero width spaces! Might be useful for discord bots. Installation npm i zwsp Usage Import the library: import { encode, decode}

Dec 12, 2022

🤖 Makes it easy to create bots on discord through a simple command handler

🤖 Makes it easy to create bots on discord through a simple command handler

MyBotHelper.JS 📚 About facilitates the creation of bots via discord.js, the repository already has a main script that automatically synchronizes and

Dec 31, 2022
Releases(1.0.3)
Owner
TARIQ
Prodigy Experienced Full-Stack Developer
TARIQ
Grupprojekt för kurserna 'Javascript med Ramverk' och 'Agil Utveckling'

JavaScript-med-Ramverk-Laboration-3 Grupprojektet för kurserna Javascript med Ramverk och Agil Utveckling. Utvecklingsguide För information om hur utv

Svante Jonsson IT-Högskolan 3 May 18, 2022
Hemsida för personer i Sverige som kan och vill erbjuda boende till människor på flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

null 4 May 3, 2022
Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

null 14 Jan 3, 2023
Keep your sensitive information out of chat logs, emails, and more with heavily encrypted secrets.

Free encrypted secret sharing for everyone! This application is to be used to share encrypted secrets cross organizations, or as private persons. Hemm

Hemmelig 246 Dec 31, 2022
A simple To Do List application that allows users to save, edit, mark completed, and delete their to-dos, and save their list when application is closed. Build with JavaScript.

To Do List A simple To Do List online application that allows users to save, and manipulate their to-dos, and save their list when application is clos

Mahmoud Rizk 10 Dec 20, 2022
View maps, graphs, and tables of your save and compete in a casual, evergreen leaderboard of EU4 achievement speed runs. Upload and share your save with the world.

PDX Tools PDX Tools is a modern EU4 save file analyzer that allow users to view maps, graphs, and data tables of their save all within the browser. If

PDX Tools 24 Dec 27, 2022
On this page, you can save and load all the awesome books you have and save the name and the author into the local storage. this project uses Javascript to interact with the pages

Awesome Books: refactor to use JavaScript classes In this project, We add the links to the applications into the final project Getting Started if you

Cesar Valencia 8 Nov 29, 2022
A Node.js AI chatbot with unlimited context and chat history.

Memory Bot Memory Bot is an AI chatbot built with Node.js to demonstrate unlimited context and chat history for more cost-efficient context-aware conv

Gordon Mickel 6 May 10, 2023
Discord.js v14 bot that logs everything on your Discord server

Discord Server Logger Bot Discord bot that logs all changes on your Discord server! When using this code please give credits to DEEM#6666! Deployment

DEEM 24 Dec 26, 2022
Node.js library for creating bots and sending/receiving messages using the Whatsapp Cloud API

whatsapp-cloud-api whatsapp-cloud-api is a Node.js library for creating bots and sending/receiving messages using the Whatsapp Cloud API. Contains bui

Tony 81 Jan 2, 2023