ttgc / ttgcbot Goto Github PK
View Code? Open in Web Editor NEWTtgcBot for Discord for RP (JDR) on The Tale of Great Cosmos and even more useful features
Home Page: https://ttgc.github.io/TtgcBot/
License: GNU General Public License v3.0
TtgcBot for Discord for RP (JDR) on The Tale of Great Cosmos and even more useful features
Home Page: https://ttgc.github.io/TtgcBot/
License: GNU General Public License v3.0
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:
/vocal on
to make the bot join vocal channel/finalize
on a RP channelError message
Command raised an exception: AttributeError: module 'time' has no attribute 'clock'
bug on /setMJrole command, doesn't affect new role when used
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
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.