This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# alternative to convert number strings to printable ascii, for smaller deta base strings, ' ' space reserved | |
ascii_chars = list(r'''!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~''') | |
def power_sum(values, base, offset = 0): | |
return sum(value * base ** (index + offset) for index, value in enumerate(values)) | |
def convert_text(text, chars): | |
base = len(chars) + 1 | |
chars = {char : index + 1 for index, char in enumerate(chars)} | |
temp = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
etaonisrhldcumfpgyw,.bv01k52TS9AM-CIN"438B6RPEDHx7WLOFYGJzjUq:)($K;V*?Q/X&Z!%#@`'+<=>[\]^_{|}~ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import openai | |
import discord | |
openai.api_key = os.getenv('OPENAI_API_KEY') | |
client = discord.Client(intents = discord.Intents(messages = True, message_content = True)) | |
client.processing = 0 | |
@client.event | |
async def on_ready(): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
The messagemaker command! | |
Supports: | |
- Editing message content | |
- Add, edit, remove, clear embeds: title, desc, timestamp, fields etc. - everything to customize an embed. | |
-- Exporting and Importing exclusively for the embed | |
- Importing JSON: from modal text input, from mystbin link, from existing message | |
- Exporting to JSON, as a message or uploaded as file and mystbin link if < 2000 chars | |
- Sending to: a channel, a webhook, edit existing message |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
A quick embed maker command. | |
Supports Title, URL, Description, Color, Timestamp, | |
Author (name, icon, url), Footer (icon, name), Image (url), Thumbnail (url) | |
adding and inserting fields (name, value, inline, index), | |
removing fields (index), | |
clearing fields, | |
editing fields (select -> name, value, inline) |