repl.it
@minx28/

shakespeare

Python

No description

fork
loading
Files
  • main.py
  • static
  • templates
  • bot.py
  • client.py
  • commands.py
  • customlists.py
  • help.py
  • real_insults.txt
  • reverse.gif
  • servercount.txt
  • shakespeare.py
  • sonnets.txt
  • stdout-stderr.txt
  • to_be.txt
  • TODO.txt
  • Packager files
  • poetry.lock
  • pyproject.toml
  • requirements.txt
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import sys
import requests
import os
from datetime import datetime
class Terminal:
  def __init__(self):
    sys.stdout=self
    sys.stderr=self
  def write(self,text):
    if all([thing not in text for thing in ["GET","HEAD"]]) and text not in [""," ","\n"]:
      with open("stdout-stderr.txt","a") as log:
        log.write(f"{datetime.now()}  {str(text)}\n")
  def flush(self):
    pass

Terminal()

import bot

bot.Bot()
?