Skip to content

Commit 22db713

Browse files
committed
Version 2.0
### Version 2.0 * Added cogs * Added f-strings and removed `.format()` * Created [config file](config.py) for easier setup
1 parent 367a149 commit 22db713

File tree

10 files changed

+826
-492
lines changed

10 files changed

+826
-492
lines changed

.gitignore

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,140 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
build/
12+
develop-eggs/
13+
dist/
14+
downloads/
15+
eggs/
16+
.eggs/
17+
lib/
18+
lib64/
19+
parts/
20+
sdist/
21+
var/
22+
wheels/
23+
share/python-wheels/
24+
*.egg-info/
25+
.installed.cfg
26+
*.egg
27+
MANIFEST
28+
29+
# PyInstaller
30+
# Usually these files are written by a python script from a template
31+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
32+
*.manifest
33+
*.spec
34+
35+
# Installer logs
36+
pip-log.txt
37+
pip-delete-this-directory.txt
38+
39+
# Unit test / coverage reports
40+
htmlcov/
41+
.tox/
42+
.nox/
43+
.coverage
44+
.coverage.*
45+
.cache
46+
nosetests.xml
47+
coverage.xml
48+
*.cover
49+
*.py,cover
50+
.hypothesis/
51+
.pytest_cache/
52+
cover/
53+
54+
# Translations
55+
*.mo
56+
*.pot
57+
58+
# Django stuff:
59+
*.log
60+
local_settings.py
61+
db.sqlite3
62+
db.sqlite3-journal
63+
64+
# Flask stuff:
65+
instance/
66+
.webassets-cache
67+
68+
# Scrapy stuff:
69+
.scrapy
70+
71+
# Sphinx documentation
72+
docs/_build/
73+
74+
# PyBuilder
75+
.pybuilder/
76+
target/
77+
78+
# Jupyter Notebook
79+
.ipynb_checkpoints
80+
81+
# IPython
82+
profile_default/
83+
ipython_config.py
84+
85+
# pyenv
86+
# For a library or package, you might want to ignore these files since the code is
87+
# intended to run in multiple environments; otherwise, check them in:
88+
# .python-version
89+
90+
# pipenv
91+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
93+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
94+
# install all needed dependencies.
95+
#Pipfile.lock
96+
97+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
98+
__pypackages__/
99+
100+
# Celery stuff
101+
celerybeat-schedule
102+
celerybeat.pid
103+
104+
# SageMath parsed files
105+
*.sage.py
106+
107+
# Environments
108+
.env
109+
.venv
110+
env/
111+
venv/
112+
ENV/
113+
env.bak/
114+
venv.bak/
115+
116+
# Spyder project settings
117+
.spyderproject
118+
.spyproject
119+
120+
# Rope project settings
121+
.ropeproject
122+
123+
# mkdocs documentation
124+
/site
125+
126+
# mypy
127+
.mypy_cache/
128+
.dmypy.json
129+
dmypy.json
130+
131+
# Pyre type checker
132+
.pyre/
133+
134+
# pytype static type analyzer
135+
.pytype/
136+
137+
# Cython debug symbols
138+
cython_debug/
139+
1140
.idea/*

LICENSE renamed to LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
same "printed page" as the copyright notice for easier
187187
identification within third-party archives.
188188

189-
Copyright 2018-2019 Krypton
189+
Copyright 2020 Krypton
190190

191191
Licensed under the Apache License, Version 2.0 (the "License");
192192
you may not use this file except in compliance with the License.

README.md

Lines changed: 54 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,69 @@
1-
# Python-Discord-Bot-Template
1+
# Python Discord Bot Template
2+
[![Python Versions](https://img.shields.io/badge/python-3.6%20%7C%203.7%20%7C%203.8-orange)](https://github.com/kkrypt0nn/Python-Discord-Bot-Template) [![Project Version](https://img.shields.io/badge/version-v2.0-blue)](https://github.com/kkrypt0nn/Python-Discord-Bot-Template)
3+
24
This repository is a template that everyone can use for the start of their discord bot.
35

4-
The list of update are available [here](UPDATES.md).
6+
When I first started creating my discord bot it took me a while to get everything setup and working with cogs and more. I would've been happy if there were any template existing. But there wasn't any existing template. That's why I decided to create my own template to let <b>you</b> guys create your discord bot in an easy way.
57

6-
## Bots who used this template
8+
## Authors
9+
* **[Krypton (@kkrypt0nn)](https://github.com/kkrypt0nn)** - The only and one developer
710

8-
*DM Krypton#2188 to get yourself in this list*
11+
## Support
12+
13+
If you need some help for something, do not hesitate to join my discord server [here](https://discord.gg/xkWRGBY).
914

10-
## How to use it
15+
All the updates of the template are available [here](UPDATES.md).
1116

17+
## How to download it
18+
19+
This repository is now a template, on the top left you can simple click on "**Use this template**" to create a GitHub repository based on this template.
20+
21+
Alternatively you can do the following:
1222
* Clone/Download the repository
13-
* Create a discord bot [here](https://discordapp.com/developers/applications)
23+
* To clone it and get the updates you can definitely use the command
24+
`git clone`
25+
* Create a discord bot [here](https://discord.com/developers/applications)
1426
* Get your bot token
15-
* Put the bot token in the python file at the line 14
1627
* Invite your bot on servers using the following invite:
17-
https://discordapp.com/oauth2/authorize?&client_id=YOUR_APPLICATION_ID_HERE&scope=bot&permissions=8
18-
Replace `YOUR_APPLICATION_ID_HERE` witht the application ID
19-
* Then open terminal/command prompt and run the bot using: `python3 bot.py`
28+
https://discordapp.com/oauth2/authorize?&client_id=YOUR_APPLICATION_ID_HERE&scope=bot&permissions=8 (Replace `YOUR_APPLICATION_ID_HERE` with the application ID)
29+
30+
## How to setup
2031

21-
## Things to edit
22-
Make sure to edit those things:
23-
* `BOT_PREFIX` with the prefix you want
24-
* `TOKEN` with your bot token
25-
* `OWNER` with your user discord ID
26-
* `BLACKLIST` with the user discord IDs of people that should not be able to use the bot commands
32+
To setup the bot I made it as simple as possible. I now created a [config.py](config.py) file where you can put the needed things to edit.
2733

34+
Here is an explanation of what everything is:
35+
36+
| Variable | What it is |
37+
| ------------------| ----------------------------------------------------------------------|
38+
| BOT_PREFIX | The prefix(es) of your bot |
39+
| TOKEN | The token of your bot |
40+
| APPLICATION_ID | The application ID of your bot |
41+
| OWNERS | The user ID of all the bot owners |
42+
| BLACKLIST | The user ID of all the users who can't use the bot |
43+
| STARTUP_COGS | The cogs that should be automatically loaded when you start the bot |
44+
45+
## How to start
46+
47+
To start the bot you simply need to launch, either your terminal (Linux, Mac & Windows) or your Command Prompt (Windows).
48+
49+
If you have multiple versions of python installed (2.x and 3.x) then you will need to use the following command:
50+
```
51+
python3 bot.py
52+
```
53+
or eventually
54+
```
55+
python3.8 bot.py
56+
```
57+
<br>
58+
59+
If you have just installed python today, then you just need to use the following command:
60+
```
61+
python bot.py
62+
```
2863

2964
## Built With
3065

31-
* [Python 3](https://www.python.org/) - Used Python 3
66+
* [Python 3.8](https://www.python.org/)
3267

3368
## Issues or Questions
3469

@@ -38,9 +73,9 @@ If you have any issues or questions of how to code a specific command, make sure
3873

3974
We use [SemVer](http://semver.org) for versioning. For the versions available, see the [tags on this repository](https://github.com/kkrypt0nn/Python-Discord-Bot-Template/tags).
4075

41-
## Author(s)
76+
## Bots who used this template
4277

43-
* **[Krypton](https://spacelab.wtf)** - The only and one developer
78+
*DM Krypton#2188 to get yourself in this list*
4479

4580
## License
4681

UPDATES.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
# Updates List
22
Here is the list of all the updates that I made on this template.
33

4+
### Version 2.0
5+
* Added cogs
6+
* Added f-strings and removed `.format()`
7+
* Created [config file](config.py) for easier setup
8+
49
### Version 1.2
510
* Added blacklist command
611
* Removed commands cooldown

0 commit comments

Comments
 (0)