Trying to get directories working with files

testing
sgoudham 5 years ago
parent bfd8261abd
commit d6d0809714

@ -1,4 +1,5 @@
import asyncio import asyncio
import pathlib
import random import random
import discord import discord
@ -95,8 +96,8 @@ class Fun(commands.Cog):
channels = ["bot-commands"] channels = ["bot-commands"]
# path = pathlib.Path(r'C:\Users\sgoud\PycharmProjects\EnsoBot\txtfiles\eightball.txt') path = pathlib.Path(r'C:/Users/sgoud/PycharmProjects/EnsoBot/txtfiles/eightball.txt')
with open('eightball.txt') as file: with open(path) as file:
_8ball_array = file.readlines() _8ball_array = file.readlines()
if str(ctx.channel) in channels: if str(ctx.channel) in channels:

Loading…
Cancel
Save