-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
50 changed files
with
736 additions
and
715 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
# Copyright 2021 iiPython | ||
|
||
# Modules | ||
from prism import PrismBot | ||
from dotenv import load_dotenv | ||
|
||
# Initialization | ||
load_dotenv() | ||
bot = PrismBot() | ||
|
||
# Launch bot | ||
bot.launch_bot() | ||
# Copyright 2021-xx iiPython | ||
|
||
# Modules | ||
from prism import PrismBot | ||
from dotenv import load_dotenv | ||
|
||
# Initialization | ||
load_dotenv() | ||
bot = PrismBot() | ||
|
||
# Launch bot | ||
bot.launch_bot() |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
__author__ = "iiPython" | ||
__license__ = "MIT" | ||
__copyright__ = "(c) 2021 iiPython" | ||
__version__ = "1.0.7" | ||
|
||
from .logging import logger | ||
from .core.bot import PrismBot | ||
|
||
import logging | ||
logging.basicConfig(level = logging.CRITICAL) | ||
__author__ = "iiPython" | ||
__license__ = "MIT" | ||
__copyright__ = "(c) 2021 iiPython" | ||
__version__ = "1.0.7" | ||
|
||
from .logging import logger | ||
from .core.bot import PrismBot | ||
|
||
import logging | ||
logging.basicConfig(level = logging.CRITICAL) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright 2021 iiPython | ||
# Copyright 2021-xx iiPython | ||
|
||
# Modules | ||
import discord | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright 2021 iiPython | ||
# Copyright 2021-xx iiPython | ||
|
||
# Modules | ||
import discord | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright 2021 iiPython | ||
# Copyright 2021-xx iiPython | ||
|
||
# Modules | ||
import random | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright 2021 iiPython | ||
# Copyright 2021-xx iiPython | ||
|
||
# Modules | ||
from discord.ext import commands | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright 2021 iiPython | ||
# Copyright 2021-xx iiPython | ||
|
||
# Modules | ||
import math | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright 2021 iiPython | ||
# Copyright 2021-xx iiPython | ||
|
||
# Modules | ||
import discord | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright 2021 iiPython | ||
# Copyright 2021-xx iiPython | ||
|
||
# Modules | ||
import discord | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright 2021 iiPython | ||
# Copyright 2021-xx iiPython | ||
|
||
# Modules | ||
import random | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright 2021 iiPython | ||
# Copyright 2021-xx iiPython | ||
|
||
# Modules | ||
import math | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright 2021 iiPython | ||
# Copyright 2021-xx iiPython | ||
|
||
# Modules | ||
import ast | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright 2021 iiPython | ||
# Copyright 2021-xx iiPython | ||
|
||
# Modules | ||
import discord | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright 2021 iiPython | ||
# Copyright 2021-xx iiPython | ||
|
||
# Modules | ||
import discord | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright 2021 iiPython | ||
# Copyright 2021-xx iiPython | ||
|
||
# Modules | ||
import random | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright 2021 iiPython | ||
# Copyright 2021-xx iiPython | ||
|
||
# Modules | ||
import math | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright 2021 iiPython | ||
# Copyright 2021-xx iiPython | ||
|
||
# Modules | ||
import random | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright 2021 iiPython | ||
# Copyright 2021-xx iiPython | ||
|
||
# Modules | ||
import random | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright 2021 iiPython | ||
# Copyright 2021-xx iiPython | ||
|
||
# Modules | ||
import random | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright 2021 iiPython | ||
# Copyright 2021-xx iiPython | ||
|
||
# Modules | ||
import random | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright 2021 iiPython | ||
# Copyright 2021-xx iiPython | ||
|
||
# Modules | ||
import math | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright 2021 iiPython | ||
# Copyright 2021-xx iiPython | ||
|
||
# Modules | ||
import discord | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright 2021 iiPython | ||
# Copyright 2021-xx iiPython | ||
|
||
# Modules | ||
from discord.ext import commands | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright 2021 iiPython | ||
# Copyright 2021-xx iiPython | ||
|
||
# Modules | ||
import csv | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright 2021 iiPython | ||
# Copyright 2021-xx iiPython | ||
|
||
# Modules | ||
import discord | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright 2021 iiPython | ||
# Copyright 2021-xx iiPython | ||
|
||
# Modules | ||
import discord | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright 2021 iiPython | ||
# Copyright 2021-xx iiPython | ||
|
||
# Modules | ||
from discord.ext import commands | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright 2021 iiPython | ||
# Copyright 2021-xx iiPython | ||
|
||
# Modules | ||
import discord | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright 2021 iiPython | ||
# Copyright 2021-xx iiPython | ||
|
||
# Modules | ||
import os | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright 2021 iiPython | ||
# Copyright 2021-xx iiPython | ||
|
||
# Modules | ||
from prism import __version__ | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright 2021 iiPython | ||
# Copyright 2021-xx iiPython | ||
|
||
# Modules | ||
import os | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright 2021 iiPython | ||
# Copyright 2021-xx iiPython | ||
|
||
# Modules | ||
import discord | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright 2021 iiPython | ||
# Copyright 2021-xx iiPython | ||
|
||
# Modules | ||
import os | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright 2021 iiPython | ||
# Copyright 2021-xx iiPython | ||
|
||
# Modules | ||
import discord | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright 2021 iiPython | ||
# Copyright 2021-xx iiPython | ||
|
||
# Modules | ||
import discord | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright 2021 iiPython | ||
# Copyright 2021-xx iiPython | ||
|
||
# Modules | ||
import discord | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,48 @@ | ||
# Copyright 2021 iiPython | ||
|
||
# Modules | ||
import os | ||
import json | ||
from typing import Any | ||
from .logging import logger | ||
|
||
# Config class | ||
class Configuration(object): | ||
def __init__(self) -> None: | ||
self.default = { | ||
"debug": False | ||
} | ||
self.config = self.default | self._load_config() | ||
|
||
def _load_config(self) -> dict: | ||
if not os.path.exists("config.json"): | ||
return logger.log("crash", "No config.json file exists, please create it and relaunch.") | ||
|
||
with open("config.json", "r") as config_file: | ||
try: | ||
raw_config = json.loads(config_file.read()) | ||
|
||
except json.JSONDecodeError: | ||
return logger.log("crash", "Failed while attempting to load config.json") | ||
|
||
return raw_config | ||
|
||
def get(self, key: Any) -> Any: | ||
if isinstance(key, list): | ||
value = self.config[key[0]] | ||
for k in key[1:]: | ||
value = value[k] | ||
|
||
else: | ||
value = self.config[key] | ||
|
||
return value | ||
|
||
def set(self, key: Any, value: Any) -> None: | ||
self.config[key] = value | ||
|
||
def merge(self, data: dict) -> None: | ||
self.config = self.config | data | ||
|
||
# Initialization | ||
config = Configuration() | ||
# Copyright 2021-xx iiPython | ||
|
||
# Modules | ||
import os | ||
import json | ||
from typing import Any | ||
from .logging import logger | ||
|
||
# Config class | ||
class Configuration(object): | ||
def __init__(self) -> None: | ||
self.default = { | ||
"debug": False | ||
} | ||
self.config = self.default | self._load_config() | ||
|
||
def _load_config(self) -> dict: | ||
if not os.path.exists("config.json"): | ||
return logger.log("crash", "No config.json file exists, please create it and relaunch.") | ||
|
||
with open("config.json", "r") as config_file: | ||
try: | ||
raw_config = json.loads(config_file.read()) | ||
|
||
except json.JSONDecodeError: | ||
return logger.log("crash", "Failed while attempting to load config.json") | ||
|
||
return raw_config | ||
|
||
def get(self, key: Any) -> Any: | ||
if isinstance(key, list): | ||
value = self.config[key[0]] | ||
for k in key[1:]: | ||
value = value[k] | ||
|
||
else: | ||
value = self.config[key] | ||
|
||
return value | ||
|
||
def set(self, key: Any, value: Any) -> None: | ||
self.config[key] = value | ||
|
||
def merge(self, data: dict) -> None: | ||
self.config = self.config | data | ||
|
||
# Initialization | ||
config = Configuration() |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright 2021 iiPython | ||
# Copyright 2021-xx iiPython | ||
# Helper functions for bank management | ||
|
||
# Modules | ||
|
Oops, something went wrong.