MADE RUST TRANSFER ARGS TO PYTHON LETS GOOOOOOOOOOOOOOOOOOOOOOO
This commit is contained in:
+6
-1
@@ -2,9 +2,11 @@ from io import TextIOWrapper
|
||||
from praw import models
|
||||
import praw
|
||||
import os
|
||||
|
||||
from macros import *
|
||||
|
||||
class Bot:
|
||||
args: list[str] = ["NO_RUST", "--dev", "--py"]
|
||||
password: str = os.environ.get("ASSISTANT_R_PASS")
|
||||
secret: str = os.environ.get("ASSISTANT_R_TOKEN")
|
||||
|
||||
@@ -22,4 +24,7 @@ class Bot:
|
||||
)
|
||||
sr: models.Subreddit = r.subreddit("bytedicetesting") #r.subreddit("boykisser")
|
||||
data_f: TextIOWrapper = None
|
||||
data: dict = {}
|
||||
data: dict = {}
|
||||
|
||||
def set_args(self, args: list[str]):
|
||||
self.args = args
|
||||
+6
-1
@@ -1,14 +1,19 @@
|
||||
import sys
|
||||
|
||||
from macros import *
|
||||
import bot as botPy
|
||||
import data
|
||||
from macros import *
|
||||
|
||||
|
||||
def main():
|
||||
sys.stdout.reconfigure(encoding="utf-8")
|
||||
|
||||
bot = botPy.Bot()
|
||||
try: bot.set_args(args)
|
||||
except NameError:
|
||||
py_print("No command args found from Rust. Don't worry though, we have backup in place.")
|
||||
|
||||
py_print("ARGS:", str(bot.args[1:]))
|
||||
py_print("Reading data...")
|
||||
data.read_data(bot)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user