Skip to content

Commit

Permalink
Switch to mongo URIs
Browse files Browse the repository at this point in the history
  • Loading branch information
MattBSG committed Feb 23, 2024
1 parent 8e56987 commit b5e47a1
Show file tree
Hide file tree
Showing 15 changed files with 15 additions and 17 deletions.
2 changes: 1 addition & 1 deletion bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
logging.critical('[Bot] config.py does not exist, you should make one from the example config')
exit(1)

mclient = pymongo.MongoClient(config.mongoHost, username=config.mongoUser, password=config.mongoPass)
mclient = pymongo.MongoClient(config.mongoURI)
intents = discord.Intents(
guilds=True,
members=True,
Expand Down
4 changes: 1 addition & 3 deletions config.example.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
giantbomb = 'key'

# Mongo Credentials
mongoUser = 'user'
mongoPass = 'password'
mongoHost = 'host'
mongoURI = 'MongoDB URI'

# Users
parakarry: int = bot
Expand Down
2 changes: 1 addition & 1 deletion events/extralife.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def __init__(self, bot):

################################################################################################################################

self.mclient = pymongo.MongoClient(config.mongoHost, username=config.mongoUser, password=config.mongoPass)
self.mclient = pymongo.MongoClient(config.mongoURI)
self.bot = bot
self.guild = self.bot.get_guild(self.GUILD)
self.extra_life_admin = self.guild.get_channel(self.EXTRA_LIFE_ADMIN)
Expand Down
2 changes: 1 addition & 1 deletion events/old/acnhEvent.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from discord.ext import commands, tasks


mclient = pymongo.MongoClient(config.mongoHost, username=config.mongoUser, password=config.mongoPass)
mclient = pymongo.MongoClient(config.mongoURI)


class AnimalGame(commands.Cog):
Expand Down
2 changes: 1 addition & 1 deletion events/old/gooseGameEvent.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from discord.ext import commands


mclient = pymongo.MongoClient(config.mongoHost, username=config.mongoUser, password=config.mongoPass)
mclient = pymongo.MongoClient(config.mongoURI)


class GooseGame(commands.Cog):
Expand Down
2 changes: 1 addition & 1 deletion events/old/lmEvent.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
from events.resources.lm3 import qte


mclient = pymongo.MongoClient(config.mongoHost, username=config.mongoUser, password=config.mongoPass)
mclient = pymongo.MongoClient(config.mongoURI)


class Mansion(commands.Cog):
Expand Down
2 changes: 1 addition & 1 deletion events/old/mario35Event.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from discord.ext import commands


mclient = pymongo.MongoClient(config.mongoHost, username=config.mongoUser, password=config.mongoPass)
mclient = pymongo.MongoClient(config.mongoURI)
activeEmoji = """
<:spacer:754356052387954748><:spacer:754356052387954748><a:Mario_Brick_Top:753445692587900960>
<:spacer:754356052387954748><:spacer:754356052387954748><a:Mario_Brick_Below_Top:753441662960664626>
Expand Down
2 changes: 1 addition & 1 deletion events/tgapool.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from tools import commit_profile_change


mclient = pymongo.MongoClient(config.mongoHost, username=config.mongoUser, password=config.mongoPass)
mclient = pymongo.MongoClient(config.mongoURI)


class TGAPool(commands.Cog):
Expand Down
2 changes: 1 addition & 1 deletion modules/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@


startTime = int(time.time())
mclient = pymongo.MongoClient(config.mongoHost, username=config.mongoUser, password=config.mongoPass)
mclient = pymongo.MongoClient(config.mongoURI)


class MainEvents(commands.Cog):
Expand Down
2 changes: 1 addition & 1 deletion modules/games.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import tools # type: ignore


mclient = pymongo.MongoClient(config.mongoHost, username=config.mongoUser, password=config.mongoPass)
mclient = pymongo.MongoClient(config.mongoURI)

GIANTBOMB_NSW_ID = 157
AUTO_SYNC = True
Expand Down
2 changes: 1 addition & 1 deletion modules/moderation.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import tools


mclient = pymongo.MongoClient(config.mongoHost, username=config.mongoUser, password=config.mongoPass)
mclient = pymongo.MongoClient(config.mongoURI)


class StrikeRange(commands.Converter):
Expand Down
2 changes: 1 addition & 1 deletion modules/social.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
import tools # type: ignore


mclient = pymongo.MongoClient(config.mongoHost, username=config.mongoUser, password=config.mongoPass)
mclient = pymongo.MongoClient(config.mongoURI)


class SocialFeatures(commands.Cog, name='Social Commands'):
Expand Down
2 changes: 1 addition & 1 deletion modules/statistics.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import tools


mclient = pymongo.MongoClient(config.mongoHost, username=config.mongoUser, password=config.mongoPass)
mclient = pymongo.MongoClient(config.mongoURI)


class StatCommands(commands.Cog, name='Statistic Commands'):
Expand Down
2 changes: 1 addition & 1 deletion modules/utility.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import tools


mclient = pymongo.MongoClient(config.mongoHost, username=config.mongoUser, password=config.mongoPass)
mclient = pymongo.MongoClient(config.mongoURI)

serverLogs = None
modLogs = None
Expand Down
2 changes: 1 addition & 1 deletion tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import pymongo


mclient = pymongo.MongoClient(config.mongoHost, username=config.mongoUser, password=config.mongoPass)
mclient = pymongo.MongoClient(config.mongoURI)

linkRe = re.compile(r'http[s]?://(?:[a-zA-Z]|[0-9]|[#-_]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+', re.I)
reasonFilterLinkRe = re.compile(
Expand Down

0 comments on commit b5e47a1

Please sign in to comment.