Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linking #19

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Linking #19

wants to merge 3 commits into from

Conversation

ThatGuyDed
Copy link

I have no clue how to use github, but I think this works :P . Seriously though, how do I use this.

ThatGuyDed added 2 commits May 9, 2019 19:19
Created a very crude account linking method that allows the user to link a steam account to 1 discord account (discord accounts can only have 1 linked account but steam accounts can have multiple connected discord accounts). Also created a text file to store linked accounts
Didn't think leaving my bot token would be a good idea :P
@@ -0,0 +1 @@
298910672731766784:76561198404047726
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does not need to be committed.
But I like the format of it

@@ -274,9 +276,49 @@ def chunks(l, n):
args = ctx.message.content.split(" ")

if len(args) < 2:
await bot.send_message(ctx.message.channel,
PastUsers = open("UserIDs.txt", "r+")
NotLinked = True
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should load this at bot startup instead of at every call

except ImportError:
print('Unable to run bot, as token does not exist!')
sys.exit()

bot = Bot(BOT_PREFIX)
bot.remove_command("help")

NotLinked = True
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

load it into a map at bot startup and then not have a global variable

@@ -13,14 +13,16 @@
from discord.ext.commands import Bot

try:
from config import TOKEN, BOT_PREFIX
from config_example import TOKEN, BOT_PREFIX
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be reverted.

async def test(ctx):
#Gets id that is being linked to
args = ctx.message.content.split(" ")
UserID = args[1]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Snake case for all variables please.

calculated_bot.py Outdated Show resolved Hide resolved
for line in PastUsers:
check = line
check = check.strip()
check = check.split(":")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same thing as the other comment. Possibly put this code in a function so you don't have to write it twice.

Co-Authored-By: Matthew Mage <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants