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

How to help adding to the bot's FAQ functionality #7

Open
delta1512 opened this issue Apr 30, 2018 · 1 comment
Open

How to help adding to the bot's FAQ functionality #7

delta1512 opened this issue Apr 30, 2018 · 1 comment
Labels
help wanted Extra attention is needed

Comments

@delta1512
Copy link
Owner

Given the large influx of people wanting to help formulate information for the bot, I have decided to make a guide on how to contribute to the FAQ feature:

  1. Open the FAQ.py file in a text editor.

  2. Above the line that starts with index =, write a python comment with the title of your article. E.g # How to write a FAQ article

  3. Below the comment you just wrote, write a variable name that describes your article as briefly as possible and is in snake_case form. E.g make_faq_article =

  4. Paste the following segment of code after the equals sign, replacing [Your Title Here] with the title you created in step 2:

discord.Embed(title='[Your Title Here]', colour=discord.Colour.purple(),
description='''
''')
  1. Write your article or convert an existing article into markdown and make sure that your links are embedded in some sort of text unless it is absolutely necessary to do otherwise. Also ensure that within the link field of the embedded link you place an open and closing curly brackets ({}). E.g Welcome to the FAQ, [this is a link]({}). Thank you for reading

  2. Copy and paste the finalised article into the description variable in step 4, right in between the sets of three apostrophes:

...
description='''
[your article here]
''')
  1. Any URLs used for links in your article should go into the links variable at the very top of the code. To do this, on the very last link in the list, place a comma directly after this and before the number that is right after it. Then make a new line and insert your URL into some apostrophes, then adding a comment after the line with the number you found above and increment it by one. E.g:
...
'https://example.com/', #34
'https://yourlink.com/' #35
]
  1. At the end of your description variable (refer to step 4) and immediately before the ending parentheses, type .format( and enter in the links variable with the index of the number you gave it in step 7. E.g:
...
description='''
Welcome to the FAQ, [this is a link]({}). Thank you for reading
'''.format(links[35]))

(for multiple links, add a comma after you reference your first link and then write the next, repeating this process for as many links as you have)

  1. At the end of the variable called index at the bottom of the code, place a comma directly after the last closing curly bracket (}) and immediately before the closing square bracket (]), then press enter and add your article name and variable to a dictionary. E.g {'How to write a FAQ article' : make_faq_article}]

  2. Check that your changes follow the etiquette rules outlined below and then send out a PR.

Etiquette

  • Do not put tabs at the start of any line within the description variable in step 4
  • When adding links in step 7, check if the same URL already exists in the links variable. If it does, then use the number next to it in the links variable as the number you use for step 8 instead.
  • If you are using a very large amount of links, please try to make it look neat and don't put it all on one line. An example of how to do this is at the end of the useful_links variable in the code.
  • Only add links to the end of the links variable, not at any other index above.
  • As stated in step 5, do not write any URLs within any description variable unless absolutely necessary.
@delta1512 delta1512 added the help wanted Extra attention is needed label Apr 30, 2018
@nathanielcwm
Copy link

This should really be in the wiki.
Rather than an issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants