Skip to main content

A simple Discord chat exporter for Python Discord bots.

Project description

version license language

DiscordChatExporterPy is a Python plugin for your discord.py bot, allowing you to export a discord channels history within a guild.

Installing

To install the library to your bot, run the command:

pip install chat-exporter

To install the repository, run the command:

git clone https://github.com/mahtoid/DiscordChatExporterPy

Usage

import discord
import chat_exporter
from discord.ext import commands

bot = commands.Bot(command_prefix="!")


@bot.event
async def on_ready():
    print("Live: " + bot.user.name)
    chat_exporter.init_exporter(bot)


@bot.command()
async def save(ctx):
    await chat_exporter.export(ctx)

if __name__ == "__main__":
    bot.run("BOT_TOKEN_HERE")

Screenshots

https://raw.githubusercontent.com/mahtoid/DiscordChatExporterPy/master/.screenshots/channel_output.png https://raw.githubusercontent.com/mahtoid/DiscordChatExporterPy/master/.screenshots/html_output.png

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

chat_exporter-1.1.6.8.tar.gz (27.4 kB view hashes)

Uploaded Source

Built Distribution

chat_exporter-1.1.6.8-py3-none-any.whl (31.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page