Git Product home page Git Product logo

hacktoberbot's Introduction

hacktoberbot

A community project for Hacktoberfest 2018. A Discord bot primarily designed to help teach Python learners from the PythonDiscord community how to contribute to open source.

You can find our community by going to https://discord.gg/python

Motivations

We know it can be difficult to get into the whole open source thing at first. To help out, we've decided to start a little community project during hacktober that you can all choose to contribute to if you're finding the event a little overwhelming, or if you're new to this whole thing and just want someone to hold your hand at first.

Commands

!repository - Links to this repository

Git

!Git - Links to getting started with Git page !Git.commit - An example commit command

Halloween Facts

Random halloween facts are posted regularly.
!hallofact - Show the last posted Halloween fact

Getting started

If you are new to this you will find it far easier using PyCharm:

With PyCharm

First things first, what is PyCharm?
PyCharm is a Python IDE(integrated development environment) that is used to make python development quicker and easier overall.
So now your going to need to download it here.

1. Fork

Ok, now you have got PyCharm downloading you are going to want to fork this project and find its git URL. To fork scroll to the top of the page and press this button. Then when you new forked repository loads you are going to want to get the Git Url by clicking the green clone or download button and then the copy link button as seen below:

2. Clone

Now that you have done that you are going to want to load up Pycharm and you'll get something like this without the left sidebar: You going to want to click Check Out from Version Control->Git and you'll get a popup like the one below: Now paste your link in, test the connection and hit clone. You now have a copy of your repository to work with and it should setup your Pipenv automatically.

3. Bot

Now we have setup our repository we need somewhere to test out bot. You'll need to make a new discord server: We need to make the applicaiton for our bot... navigate over to discordapp.com/developers and hit new application Now we have our discord application you'll want to name your bot as below: To actually make the bot hit Bot->Add Bot->Yes, do It! as below: Copy that Token and put to somewhere for safe keeping. Now to add that robot to out new discord server we need to generate an OAuth2 Url to do so navigate to the OAuth2 tab, Scroll to the OAUTH2 URL GENERATOR section, click the Bot checkbox in the scope section and finally hit the administrator checkbox in the newly formed Bot Permissions section. Copy and paste the link into your browser and follow the instructions to add the bot to your server - ensure it is the server you have just created.

4. Run Configurations

Go back to PyCharm and you should have something a bit like below, Your going to want to hit the Add Configuration button in the top right. We are going to want to choose a python config as below: The first setting we need to change is script path as below (the start script may have changed from bot.py so be sure to click the right one Now we need to add an enviroment variable - what this will do is allow us to set a value without it affact the main repository. To do this click the folder icon to the right of the text, then on the new window the plus icon. Now name the var HACKTOBERBOT_TOKEN and give the value the token we kept for safe keeping earilier. Now hit apply on that window and your ready to get going!

5. Git in PyCharm

As we work on our project we are going to want to make commits. Commits are effectively a list of changes you made to the pervious version. To make one first hit the green tick in the top right

  1. Select the files you wish to commit
  2. Write a brief description of what your commit is
  3. See the actual changes you commit does here (you can also turn some of them off or on if you wish)
  4. Hit commit

Now once you have made a few commits and are happy with your changes you are going to want to push them back to your fork. There are three ways of doing this.

  1. Using the VSC Menu VSC->Git->Push
  2. Using the VSC popup alt-`->Push
  3. A shortcut: ctrl+shift+K

You should get a menu like below:

  1. List of commits
  2. List of changed files
  3. Hit Push to send to fork!

6. Pull Requests (PR or PRs)

Goto https://github.com/discord-python/hacktoberbot/pulls and the green New Pull Request button! Now you should hit Compare across forks then on the third dropdown select your fork (it will be your username/hacktoberbot) then hit Create Pull request. 1 Now to tell other people what your PR does

  1. Title - be concise and informative
  2. Description - write what the PR changes as well as what issues it relates to
  3. Hit Create pull request

7. Wait & further reading

At this point your PR will either be accepted or a maintainer might request some changes.

So you can read up some more on https://try.github.io, https://www.jetbrains.com/help/pycharm/quick-start-guide.html or you might want to learn more about Python and discord: [https://discordpy.readthedocs.io/en/rewrite/](discord.py rewrite)

Without PyCharm

The process above can be completed without PyCharm however it will be necessary to learn how to use Git, Pipenv and Environment variables.

You can find tutorials for the above below:

hacktoberbot's People

Contributors

derpdays avatar gables avatar gdude2002 avatar ignatiusflo avatar kvcvc avatar lemonsaurus avatar meooow25 avatar mrhemlock avatar ninexball avatar sco1 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.