Skip to content

Commit

Permalink
Added license and fixed readme link
Browse files Browse the repository at this point in the history
  • Loading branch information
Ztuu committed Dec 7, 2020
1 parent 5a67584 commit cf456b1
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Discord Bot in Python Model Answer
This is a basic discord bot created by completing the tasks in [this exercise](TBD).
This is a basic discord bot created by completing the tasks in [this exercise](https://github.com/Ztuu/Discord-Python-Bot-Tutorial).

The bot has the following commands:
* !test - A test command to check the bot is functioning. It should reply "test successful" in the same channel.
Expand Down
16 changes: 16 additions & 0 deletions bot/bot.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
# APACHE LICENSE
# Copyright 2020 Stuart Paterson
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.


# External Packages
import os
import discord
Expand Down
16 changes: 16 additions & 0 deletions bot/utils.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
# APACHE LICENSE
# Copyright 2020 Stuart Paterson
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.


def get_channel_by_name(client, guild, name):
"""Returns a channel by name from a specific guild"""
for server in client.guilds:
Expand Down

0 comments on commit cf456b1

Please sign in to comment.