Skip to content

Core#8

Open
seekheart wants to merge 3 commits into
devfrom
core
Open

Core#8
seekheart wants to merge 3 commits into
devfrom
core

Conversation

@seekheart

Copy link
Copy Markdown
Member

This PR closes out #7 with the addition of a bot.py file and a settings file. You'll need to make a config.json file. It looks like this:

{
  "clientId": <CLIENT_ID>,
  "clientSecret": <CLIENT_SECRET>,
  "botPrefix": <BOT_PREFIX>,
  "token": <TOKEN>
}

@LaVieEstDure

Copy link
Copy Markdown
Member

I'd change it so that it generates an empty JSON file if it doesn't find the config and gives an error telling used to fill it in. More convenient and better ensures that the user doesn't make any mistakes while making the file.

@seekheart

Copy link
Copy Markdown
Member Author

The issue with empty json file would be the same. We could include a template if it helps?

@LaVieEstDure

Copy link
Copy Markdown
Member

example_config.json? Sounds good to me

@seekheart

Copy link
Copy Markdown
Member Author

@LaVieEstDure @Heasummn can you guys check and approve and one of you merge?

Comment thread bot.py
def init_bot():
"""Creates a discord client connection"""
return discord.Client()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should we be using the discord.bot.ext frameworks? Also this feels like an unpythonic function.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

not sure what that is

Comment thread bot.py
@client.event
async def on_ready():
"""Logs the bot in for operations"""
print('logged in as {}'.format(client.user.name))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We said we'd support 3.6+, yeah? Should use f-strings where we can then

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I've never used them, can you clone and make the changes? I would like to see.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants