Giter Club home page Giter Club logo

ttgcbot's People

Contributors

dependabot[bot] avatar ttgc avatar

Stargazers

 avatar

ttgcbot's Issues

Broken vocal features on Finalize command

Describe the bug
Finalize command is using old deprecated time.clock() function wich has been removed since python 3.8, so it's should be replace with time.process_time()

To Reproduce
Steps to reproduce the behavior:

  1. Use /vocal on to make the bot join vocal channel
  2. Use /finalize on a RP channel
  3. Confirm the finalize
  4. Observe the error message

Error message

Command raised an exception: AttributeError: module 'time' has no attribute 'clock'

/setMJrole bug

bug on /setMJrole command, doesn't affect new role when used

Assign role discord is forbidden (v1.0-dev branch)

discord.Forbidden error for missing permissions is raised when the bot try to assign role to a new member for the keeprole system. The bot has the manage role permissions and its highest role is above the role wich is tried to be assigned to the new member. Normally, this shouldn't happened because of the conditions listed above.
Here is the event code :

@client.event
@asyncio.coroutine
def on_member_join(member):
    srv = DBServer(str(member.server.id))
    if srv.keepingrole:
        yield from srv.restorerolemember(client,member.server,member)

and here the code of the method restorerolemember wich try to assign role :

@asyncio.coroutine
    def restorerolemember(self,client,srv,member):
        db = Database()
        cur = db.execute("SELECT id_role FROM keeprole WHERE id_server = %(idserv)s AND id_member = %(idmemb)s;",idserv=self.ID,idmemb=member.id)
        if cur is None:
            db.close(True)
            raise DatabaseException("unable to restore roles of the member")
        ls = []
        for i in cur:
            rl = discord.utils.get(srv.roles,id=i[0])
            ls.append(rl)
            yield from client.add_roles(member,rl)
        for i in ls:
            db.call("restorerolemember",idmemb=member.id,idserv=self.ID,idrole=i.id)
        db.close()

After investigating on this bug, the role stored and got from the database is the good one and the member who will receive the role is the good one too.
PS : full code on the branch ttgc-v1.0-dev

YouTube Player

YTDL players have been removed from discord.py rewrite (v1.0 and above). Need to implement a new functionnal youtube player to fit the requirement of playing youtube songs.

Won't be fixed before at least v2.1. Until this issue is closed and player is implemented, youtube play command /play will be disabled

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.