create guild in database
This commit is contained in:
parent
bfc48a986d
commit
392e1bb65e
@ -351,8 +351,6 @@ impl Framework for RegexFramework {
|
||||
else if let (Some(guild), Some(Channel::Guild(channel))) =
|
||||
(msg.guild(&ctx).await, msg.channel(&ctx).await)
|
||||
{
|
||||
if let Some(full_match) = self.command_matcher.captures(&msg.content) {
|
||||
if check_prefix(&ctx, &guild, full_match.name("prefix")).await {
|
||||
let data = ctx.data.read().await;
|
||||
|
||||
let pool = data
|
||||
@ -360,6 +358,10 @@ impl Framework for RegexFramework {
|
||||
.cloned()
|
||||
.expect("Could not get SQLPool from data");
|
||||
|
||||
GuildData::from_guild(guild, &pool).await;
|
||||
|
||||
if let Some(full_match) = self.command_matcher.captures(&msg.content) {
|
||||
if check_prefix(&ctx, &guild, full_match.name("prefix")).await {
|
||||
let lm = data.get::<LanguageManager>().unwrap();
|
||||
|
||||
let language = UserData::language_of(&msg.author, &pool).await;
|
||||
|
Loading…
Reference in New Issue
Block a user