Tom-the-Bomb / Discord-Games

A library for making implementing conventional games into your discord bot, easier.
MIT License
55 stars 34 forks source link

BattleShip.py doesnt work #6

Closed AceyDoCodes closed 2 years ago

AceyDoCodes commented 3 years ago

the problem is that it doesnt dm me or the member my code:

import discord
from discord.ext import commands
from Discord_Games.battleship import BattleShip

class BattleShip(commands.Cog):
  def __init__(self, bot):
    self.bot = bot

  @commands.command()
  async def battleship(self, ctx, member: commands.MemberConverter):
    game = BattleShip(player1 = ctx.author, player2 = member)
    await game.start(ctx)

def setup(bot):
  bot.add_cog(BattleShip(bot))

all it does is sends this:

Game Started!
I've setup the boards in your dms!

anyone know how to fix this? also i didnt get any error

ProtDos commented 2 years ago

Do you still need help?

Tom-the-Bomb commented 2 years ago

That possibly would've been a bug I did fix a few months ago, sorry but it should work now

AceyDoCodes commented 2 years ago

Tried again today ;-; it tried to send the image but... it didnt found the image so it gave me a FileNotFoundError: [Errno 2] No such file or directory error ;-;

ProtDos commented 2 years ago

@AceyDoCodes Do you have a folder called assets? And a file called battleship.png in there? I'll attach the file if you don't have it. battleship

Tom-the-Bomb commented 2 years ago

Yea, I fixed that part a while ago, have you updated/reinstalled it?

ProtDos commented 2 years ago

I just saw this GitHub repo a short time ago. I like reinstalled it.

AceyDoCodes commented 2 years ago

I have updated/reinstalled it just a few days ago but there is not an asset folder

AceyDoCodes commented 2 years ago

i just reinstalled it again but there is still no asset folder

ProtDos commented 2 years ago

Okay. But you can create a folder and then insert the image I sent.

Tom-the-Bomb commented 2 years ago

that works, but Im very sure I fixed it too, how did you reinstall, have you restarted the bot etc? / try printing out version ?

ProtDos commented 2 years ago

I've installed the newest version of it. Of course I restarted the bot. I didn't print out version. But goodthat it helped.